mirror of
https://github.com/aclist/dztui.git
synced 2026-08-29 11:17:12 +02:00
Merge branch 'dzgui7' into feat/shortcuts
This commit is contained in:
commit
1ccb99d935
@ -39,19 +39,16 @@ logger = logging.getLogger(APP_NAME)
|
|||||||
|
|
||||||
class AppNotInstalledError(Exception):
|
class AppNotInstalledError(Exception):
|
||||||
"""App not present in user's libraryfolders"""
|
"""App not present in user's libraryfolders"""
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class AppMovedError(Exception):
|
class AppMovedError(Exception):
|
||||||
"""VDF points to a nonexistent location on disk"""
|
"""VDF points to a nonexistent location on disk"""
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class VDFLoadError(Exception):
|
class VDFLoadError(Exception):
|
||||||
"""Malformed VDF or JSON conversion"""
|
"""Malformed VDF or JSON conversion"""
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@ -321,7 +318,6 @@ def get_running_app() -> int | None:
|
|||||||
return None
|
return None
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.debug(e)
|
logger.debug(e)
|
||||||
return None
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -55,8 +55,11 @@ class ConfigManager:
|
|||||||
self.update_config(Preferences.IP_LIST, ips)
|
self.update_config(Preferences.IP_LIST, ips)
|
||||||
|
|
||||||
def update_history_file(self, fqip: str) -> None:
|
def update_history_file(self, fqip: str) -> None:
|
||||||
with open(self.prefs.paths.history, "r") as f:
|
try:
|
||||||
ips = [line.rstrip() for line in f.readlines()]
|
with open(self.prefs.paths.history, "r") as f:
|
||||||
|
ips = [line.rstrip() for line in f.readlines()]
|
||||||
|
except FileNotFoundError:
|
||||||
|
ips = []
|
||||||
|
|
||||||
seen = set()
|
seen = set()
|
||||||
ips.append(fqip)
|
ips.append(fqip)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user