summaryrefslogtreecommitdiffstats
path: root/Lib/pdb.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-10-22 21:16:34 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-10-22 21:16:34 (GMT)
commitc18574c98e51cce9b16508db7cb1ea56ea1942ab (patch)
tree2a31aa1f8576374bb814d19fcb905d2a5d8d53fb /Lib/pdb.py
parentcd29e9d9e148d8553b243b33fb3cdb8b64b9e003 (diff)
downloadcpython-c18574c98e51cce9b16508db7cb1ea56ea1942ab.zip
cpython-c18574c98e51cce9b16508db7cb1ea56ea1942ab.tar.gz
cpython-c18574c98e51cce9b16508db7cb1ea56ea1942ab.tar.bz2
fix #4150: pdb's up command didn't work for generators in post-mortem
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-xLib/pdb.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index a7a3a18..4a080c7 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -1224,9 +1224,7 @@ def post_mortem(t=None):
p = Pdb()
p.reset()
- while t.tb_next is not None:
- t = t.tb_next
- p.interaction(t.tb_frame, t)
+ p.interaction(None, t)
def pm():
post_mortem(sys.last_traceback)
@@ -1289,9 +1287,7 @@ def main():
print "Uncaught exception. Entering post mortem debugging"
print "Running 'cont' or 'step' will restart the program"
t = sys.exc_info()[2]
- while t.tb_next is not None:
- t = t.tb_next
- pdb.interaction(t.tb_frame,t)
+ pdb.interaction(None, t)
print "Post mortem debugger finished. The "+mainpyfile+" will be restarted"