catch all exceptions and log the error

This commit is contained in:
isanae
2021-02-22 17:26:44 -05:00
parent e45e970605
commit 88f5e7764b
+8 -4
View File
@@ -92,11 +92,15 @@ def parse_library_info(library_vdf_path):
continue
try:
library_folders.append(
LibraryFolder(parts[2].strip().replace("\\\\", "\\"))
path = parts[2].strip().replace("\\\\", "\\")
library_folders.append(LibraryFolder(path))
except Exception as e:
print(
'Failed to read steam library from "{}", {}'.format(
path, repr(e)
),
file=sys.stderr,
)
except (FileNotFoundError, ValueError):
continue
return library_folders