Show More
@@ -59,11 +59,11 b' else:' | |||
|
59 | 59 | # Allow the set_trace code to operate outside of an ipython instance, even if |
|
60 | 60 | # it does so with some limitations. The rest of this support is implemented in |
|
61 | 61 | # the Tracer constructor. |
|
62 | def BdbQuit_excepthook(et,ev,tb): | |
|
62 | def BdbQuit_excepthook(et,ev,tb,orig_hook): | |
|
63 | 63 | if et==bdb.BdbQuit: |
|
64 | 64 | print('Exiting Debugger.') |
|
65 | 65 | else: |
|
66 |
|
|
|
66 | orig_hook(et,ev,tb) | |
|
67 | 67 | |
|
68 | 68 | def BdbQuit_IPython_excepthook(self,et,ev,tb,tb_offset=None): |
|
69 | 69 | print('Exiting Debugger.') |
@@ -108,8 +108,8 b' class Tracer(object):' | |||
|
108 | 108 | ip = get_ipython() |
|
109 | 109 | except NameError: |
|
110 | 110 | # Outside of ipython, we set our own exception hook manually |
|
111 | BdbQuit_excepthook.excepthook_ori = sys.excepthook | |
|
112 |
|
|
|
111 | sys.excepthook = lambda et, ev, tb, orig_hook=sys.excepthook: \ | |
|
112 | BdbQuit_excepthook(et, ev, tb, orig_hook) | |
|
113 | 113 | def_colors = 'NoColor' |
|
114 | 114 | try: |
|
115 | 115 | # Limited tab completion support |
General Comments 0
You need to be logged in to leave comments.
Login now