Rev 6556: (jelmer) Remove compatibility code for python 2.4 for post mortem. (Jelmer in file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/

Patch Queue Manager pqm at pqm.ubuntu.com
Tue Aug 28 21:17:31 UTC 2012


At file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 6556 [merge]
revision-id: pqm at pqm.ubuntu.com-20120828211731-5di1tveevpzcdtd9
parent: pqm at pqm.ubuntu.com-20120823155832-tqnebdscxhd8euki
parent: jelmer at samba.org-20120828204922-o8ok2komaeab6o2v
committer: Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2012-08-28 21:17:31 +0000
message:
  (jelmer) Remove compatibility code for python 2.4 for post mortem. (Jelmer
   Vernooij)
modified:
  bzrlib/commands.py             bzr.py-20050309040720-d10f4714595cf8c3
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py	2012-03-13 17:25:29 +0000
+++ b/bzrlib/commands.py	2012-08-28 20:49:22 +0000
@@ -935,28 +935,8 @@
         exitcode = trace.report_exception(exc_info, sys.stderr)
         if os.environ.get('BZR_PDB'):
             print '**** entering debugger'
-            tb = exc_info[2]
             import pdb
-            if sys.version_info[:2] < (2, 6):
-                # XXX: we want to do
-                #    pdb.post_mortem(tb)
-                # but because pdb.post_mortem gives bad results for tracebacks
-                # from inside generators, we do it manually.
-                # (http://bugs.python.org/issue4150, fixed in Python 2.6)
-
-                # Setup pdb on the traceback
-                p = pdb.Pdb()
-                p.reset()
-                p.setup(tb.tb_frame, tb)
-                # Point the debugger at the deepest frame of the stack
-                p.curindex = len(p.stack) - 1
-                p.curframe = p.stack[p.curindex][0]
-                # Start the pdb prompt.
-                p.print_stack_entry(p.stack[p.curindex])
-                p.execRcLines()
-                p.cmdloop()
-            else:
-                pdb.post_mortem(tb)
+            pdb.post_mortem(exc_info[2])
         return exitcode
 
 




More information about the bazaar-commits mailing list