From 9a2cb291f5857c4c670ecce37ddd53e60e61e4b8 Mon Sep 17 00:00:00 2001 From: Qudix <17361645+Qudix@users.noreply.github.com> Date: Sat, 2 Jan 2021 19:08:54 -0600 Subject: [PATCH] Fix error when vdf doesn't exist (v2.3.x) --- steam_utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/steam_utils.py b/steam_utils.py index 356b579..a1d72f8 100644 --- a/steam_utils.py +++ b/steam_utils.py @@ -110,8 +110,11 @@ def find_games() -> Dict[str, Path]: os.path.dirname(steam_path), "steamapps", "libraryfolders.vdf" ) - library_folders = parse_library_info(library_vdf_path) - library_folders.append(LibraryFolder(os.path.dirname(steam_path))) + try: + library_folders = parse_library_info(library_vdf_path) + library_folders.append(LibraryFolder(os.path.dirname(steam_path))) + except FileNotFoundError: + return {} games: Dict[str, Path] = {} for library in library_folders: