flame: fixing pref file handling

This commit is contained in:
Jakub Jezek 2022-01-05 14:36:21 +01:00
parent b3a2842949
commit 97f6afa90f
No known key found for this signature in database
GPG key ID: D8548FBF690B100A
2 changed files with 7 additions and 4 deletions

View file

@ -114,11 +114,14 @@ class FlameAppFramework(object):
self.hostname,
)
self.log.info("[{}] waking up".format(self.__class__.__name__))
self.load_prefs()
self.log.info("[{}] waking up".format(self.__class__.__name__))
try:
self.load_prefs()
except RuntimeError:
self.save_prefs()
# menu auto-refresh defaults
if not self.prefs_global.get("menu_auto_refresh"):
self.prefs_global["menu_auto_refresh"] = {
"media_panel": True,

View file

@ -106,7 +106,7 @@ def _sync_utility_scripts(env=None):
)
else:
shutil.copy2(src, dst)
except PermissionError as msg:
except (PermissionError, FileExistsError) as msg:
log.warning(
"Not able to coppy to: `{}`, Problem with: `{}`".format(
dst,