mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 14:42:54 +01:00
change: suppress missing shortcuts message
This commit is contained in:
1 parent
100cb43afc
commit
5fb10d9758
1 file changed
+6
-5
@@ -173,11 +173,12 @@ class Shortcuts:
|
|||||||
self.save_shortcuts()
|
self.save_shortcuts()
|
||||||
|
|
||||||
def save_shortcuts(self) -> None:
|
def save_shortcuts(self) -> None:
|
||||||
try:
|
if self.shortcuts_path.is_file():
|
||||||
backup = self.shortcuts_path.with_suffix(".vdf.bak")
|
try:
|
||||||
shutil.copy(self.shortcuts_path, backup)
|
backup = self.shortcuts_path.with_suffix(".vdf.bak")
|
||||||
except Exception as e:
|
shutil.copy(self.shortcuts_path, backup)
|
||||||
logger.critical(e)
|
except Exception as e:
|
||||||
|
logger.critical(e)
|
||||||
try:
|
try:
|
||||||
with open(self.shortcuts_path, "wb") as f:
|
with open(self.shortcuts_path, "wb") as f:
|
||||||
vdf.binary_dump(self.shortcuts, f)
|
vdf.binary_dump(self.shortcuts, f)
|
||||||
|
|||||||
Reference in new issue
Block a user