Skip to content
Prev Previous commit
Next Next commit
Refactor exception variable naming in pdb.py for clarity
Signed-off-by: Frost Ming <me@frostming.com>
  • Loading branch information
frostming committed Oct 15, 2025
commit c50b200efb4bf3ca338673490e70c60c99967b4b
10 changes: 5 additions & 5 deletions Lib/pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -3577,12 +3577,12 @@ def main():
parser.error("argument -m: not allowed with argument --pid")
try:
attach(opts.pid, opts.commands)
except RuntimeError as e:
while e.__context__ is not None:
e = e.__context__
print(f"Error attaching to process: {e}")
except RuntimeError as exc:
while exc.__context__ is not None:
exc = exc.__context__
print(f"Error attaching to process: {exc}")
sys.exit(1)
except PermissionError as e:
except PermissionError:
exit_with_permission_help_text()
return
elif opts.module:
Expand Down
Loading