Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/aspire/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def handle_exception(exc_type, exc_value, exc_traceback):
.decode("utf8")
.split("\n")
)
except: # nopep8 # noqa: E722
except Exception: # nopep8 # noqa: E722
pass

lines.append("pip freeze output:")
Expand All @@ -49,7 +49,7 @@ def handle_exception(exc_type, exc_value, exc_traceback):
.decode("utf8")
.split("\n")
)
except: # nopep8 # noqa: E722
except Exception: # nopep8 # noqa: E722
pass

# Walk through all traceback objects (oldest call -> most recent call), capturing frame/local variable information.
Expand All @@ -60,7 +60,7 @@ def handle_exception(exc_type, exc_value, exc_traceback):
stack_summary = traceback.StackSummary.extract(
frame_generator, capture_locals=True
)
except: # nopep8 # noqa: E722
except Exception: # nopep8 # noqa: E722
# The above code, while more informative, doesn't always work.
# When it doesn't try something simpler.
stack_summary = traceback.StackSummary.extract(
Expand All @@ -74,7 +74,7 @@ def handle_exception(exc_type, exc_value, exc_traceback):
try:
with open("aspire.err.log", "w") as f:
f.write("\n".join(lines) + "\n")
except: # nopep8 # noqa: E722
except Exception: # nopep8 # noqa: E722
pass

try:
Expand Down
2 changes: 1 addition & 1 deletion src/aspire/utils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def get_full_version():
except (FileNotFoundError, subprocess.CalledProcessError):
# no git or not a git repo? assume 'src'
rev = "src"
except: # nopep8 # noqa: E722
except Exception: # nopep8 # noqa: E722
# Something unexpected happened - rev number defaults to 'x'
rev = "x"

Expand Down