We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91495eb commit 0e33142Copy full SHA for 0e33142
1 file changed
docksec.py
@@ -16,7 +16,7 @@ def get_version() -> str:
16
try:
17
from importlib.metadata import version
18
return version("docksec")
19
- except Exception:
+ except Exception: # package not installed; fall through to source fallback
20
pass
21
22
@@ -26,7 +26,7 @@ def get_version() -> str:
26
match = re.search(r'version="([^"]+)"', f.read())
27
if match:
28
return match.group(1)
29
+ except Exception: # setup.py missing or unreadable; fall through to unknown
30
31
32
return "unknown"
0 commit comments