##// END OF EJS Templates
Prevent a nasty traceback if %debug is called before any exception has occurred.
fperez -
Show More
@@ -6,7 +6,7 b' Requires Python 2.3 or newer.'
6
6
7 This file contains all the classes and helper functions specific to IPython.
7 This file contains all the classes and helper functions specific to IPython.
8
8
9 $Id: iplib.py 1961 2006-12-05 21:02:40Z vivainio $
9 $Id: iplib.py 1977 2006-12-11 16:52:12Z fperez $
10 """
10 """
11
11
12 #*****************************************************************************
12 #*****************************************************************************
@@ -1426,6 +1426,10 b' want to merge them back into the new files.""" % locals()'
1426 if not (force or self.call_pdb):
1426 if not (force or self.call_pdb):
1427 return
1427 return
1428
1428
1429 if not hasattr(sys,'last_traceback'):
1430 error('No traceback has been produced, nothing to debug.')
1431 return
1432
1429 have_pydb = False
1433 have_pydb = False
1430 # use pydb if available
1434 # use pydb if available
1431 try:
1435 try:
General Comments 0
You need to be logged in to leave comments. Login now