Skip to content

Commit 753b83d

Browse files
committed
Raise DockError from exceptions
1 parent 36bb427 commit 753b83d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docklib/docklib.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ def save(self):
8989
for key in self._SECTIONS:
9090
try:
9191
CFPreferencesSetAppValue(key, self.items[key], self._DOMAIN)
92-
except Exception:
93-
raise DockError
92+
except Exception as exc:
93+
raise DockError from exc
9494
for key in self._MUTABLE_KEYS:
9595
# Python doesn't support hyphens in attribute names, so convert
9696
# to/from underscores as needed.
@@ -101,8 +101,8 @@ def save(self):
101101
getattr(self, key.replace("-", "_")),
102102
self._DOMAIN,
103103
)
104-
except Exception:
105-
raise DockError
104+
except Exception as exc:
105+
raise DockError from exc
106106
if not CFPreferencesAppSynchronize(self._DOMAIN):
107107
raise DockError
108108

0 commit comments

Comments
 (0)