Return if no INI exists

This commit is contained in:
Jeremy Rimpo
2023-09-12 15:19:45 -05:00
parent 1b142d0bab
commit fe3cd9b0bf
+4 -1
View File
@@ -26,7 +26,10 @@ def find_games() -> Dict[str, Path]:
if not ea_desktop_settings_path.exists():
return games
user_ini, *_ = list(ea_desktop_settings_path.glob("user_*.ini"))
try:
user_ini, *_ = list(ea_desktop_settings_path.glob("user_*.ini"))
except ValueError:
return games
# The INI file in its current form has no section headers.
# So we wrangle the input to add it all under a fake section.