Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
  • Loading branch information
pablogsal and JelleZijlstra authored Oct 20, 2022
commit d6908e51f3be4ddcb64434aada483fadff847eb6
4 changes: 2 additions & 2 deletions Lib/traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -1024,9 +1024,9 @@ def _compute_suggestion_error(exc_value, tb, wrong_name):
elif isinstance(exc_value, ImportError):
try:
mod = __import__(exc_value.name)
except ImportError:
d = dir(mod)
except Exception:
return None
d = dir(mod)
else:
assert isinstance(exc_value, NameError)
# find most recent frame
Expand Down