Another attempt at finding the right line to tell Bandit to allow 'pass'.

This commit is contained in:
Geoff Taylor 2022-01-11 15:24:36 +00:00
parent 2d24d6f74e
commit 56cb69fe4d
1 changed files with 2 additions and 2 deletions

View File

@ -151,8 +151,8 @@ def version() -> PackageVersion:
# The exception is deliberately trapped and ignored - we just want to return "Unknown" in that situation.
try:
package_version = importlib.metadata.version("mango-explorer")
except Exception:
pass # nosec
except Exception: # nosec
pass
version_filename: str = os.path.join(DATA_PATH, ".version")
last_commit = f"Unknown (no version file found at '{version_filename}')."