We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c50b200 commit 3170eceCopy full SHA for 3170ece
Lib/pdb.py
@@ -3577,10 +3577,11 @@ def main():
3577
parser.error("argument -m: not allowed with argument --pid")
3578
try:
3579
attach(opts.pid, opts.commands)
3580
- except RuntimeError as exc:
3581
- while exc.__context__ is not None:
3582
- exc = exc.__context__
3583
- print(f"Error attaching to process: {exc}")
+ except RuntimeError:
+ print(
+ f"Cannot attach to pid {opts.pid}, please make sure that the process exists "
+ "and is using the same Python version."
3584
+ )
3585
sys.exit(1)
3586
except PermissionError:
3587
exit_with_permission_help_text()
0 commit comments