Skip to content

Commit 0e33142

Browse files
author
Advait Patel
committed
fix(version): add explanatory comments to bare except clauses to satisfy CodeQL
1 parent 91495eb commit 0e33142

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docksec.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_version() -> str:
1616
try:
1717
from importlib.metadata import version
1818
return version("docksec")
19-
except Exception:
19+
except Exception: # package not installed; fall through to source fallback
2020
pass
2121

2222
try:
@@ -26,7 +26,7 @@ def get_version() -> str:
2626
match = re.search(r'version="([^"]+)"', f.read())
2727
if match:
2828
return match.group(1)
29-
except Exception:
29+
except Exception: # setup.py missing or unreadable; fall through to unknown
3030
pass
3131

3232
return "unknown"

0 commit comments

Comments
 (0)