Skip to content

Commit b5d5a4c

Browse files
committed
fix: Narrow the broad except clause that catches Exception
1 parent 3cd7bb4 commit b5d5a4c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/export.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def main():
196196
ts = st.get("lastExportTime")
197197
if ts:
198198
last_export = int(datetime.fromisoformat(ts.replace("Z", "+00:00")).timestamp() * 1000)
199-
except Exception as e:
199+
except (json.JSONDecodeError, ValueError, OSError) as e:
200200
_logger.warning(
201201
"Could not read last export timestamp; defaulting to full export: %s",
202202
e,

0 commit comments

Comments
 (0)