diff --git a/dzgui/api/steam.py b/dzgui/api/steam.py index dcaa760..99de2e6 100644 --- a/dzgui/api/steam.py +++ b/dzgui/api/steam.py @@ -39,19 +39,16 @@ logger = logging.getLogger(APP_NAME) class AppNotInstalledError(Exception): """App not present in user's libraryfolders""" - pass class AppMovedError(Exception): """VDF points to a nonexistent location on disk""" - pass class VDFLoadError(Exception): """Malformed VDF or JSON conversion""" - pass @@ -321,7 +318,6 @@ def get_running_app() -> int | None: return None except Exception as e: logger.debug(e) - return None return None diff --git a/dzgui/managers/config.py b/dzgui/managers/config.py index 7c87b3f..d2bdb87 100644 --- a/dzgui/managers/config.py +++ b/dzgui/managers/config.py @@ -55,8 +55,11 @@ class ConfigManager: self.update_config(Preferences.IP_LIST, ips) def update_history_file(self, fqip: str) -> None: - with open(self.prefs.paths.history, "r") as f: - ips = [line.rstrip() for line in f.readlines()] + try: + with open(self.prefs.paths.history, "r") as f: + ips = [line.rstrip() for line in f.readlines()] + except FileNotFoundError: + ips = [] seen = set() ips.append(fqip)