Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-12656: Stop using bare except #25

Merged
merged 1 commit into from
Nov 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions python/lsst/base/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def getPythonPackages():
for module in PYTHON:
try:
importlib.import_module(module)
except:
except Exception:
pass # It's not available, so don't care

packages = {"python": sys.version}
Expand All @@ -103,7 +103,7 @@ def getPythonPackages():
module = sys.modules[name]
try:
ver = getVersionFromPythonModule(module)
except:
except Exception:
continue # Can't get a version from it, don't care

# Remove "foo.bar.version" in favor of "foo.bar"
Expand Down Expand Up @@ -140,7 +140,7 @@ def getEnvironmentPackages():
try:
from eups import Eups
from eups.Product import Product
except:
except ImportError:
from lsst.pex.logging import getDefaultLog
getDefaultLog().warn("Unable to import eups, so cannot determine package versions from environment")
return {}
Expand Down Expand Up @@ -173,7 +173,7 @@ def getEnvironmentPackages():
try:
rev = subprocess.check_output(revCmd).decode().strip()
diff = subprocess.check_output(diffCmd)
except:
except Exception:
ver += "@GIT_ERROR"
else:
ver += "@" + rev
Expand Down