@@ -222,9 +222,9 @@ def get_name(i, obj, depth=0):
222
222
_orig_except_hook = sys .excepthook
223
223
224
224
225
- def _qt_except_hook (type , value , tback ):
225
+ def _qt_except_hook (type_ , value , tback ):
226
226
# only print the exception and do *not* exit the program
227
- traceback .print_exception (type , value , tback )
227
+ traceback .print_exception (type_ , value , tback )
228
228
# only catch simple Exception (avoid catching KeyboardInterrupt, ...)
229
229
if not isinstance (value , Exception ):
230
230
# in a Qt app, the except hook is only called when the window gets the focus again,
@@ -272,7 +272,7 @@ def _get_debug_except_hook(root_path=None, usercode_traceback=True, usercode_fra
272
272
if root_path is None :
273
273
root_path = os .path .dirname (main_file )
274
274
275
- def excepthook (type , value , tback ):
275
+ def excepthook (type_ , value , tback ):
276
276
# first try to go as far as the main module because in some cases (e.g. when we run the file via a debugger),
277
277
# the top of the traceback is not always the main module
278
278
current_tb = tback
@@ -295,7 +295,7 @@ def excepthook(type, value, tback):
295
295
user_tb_length += 1
296
296
297
297
tb_limit = user_tb_length if usercode_traceback else None
298
- traceback .print_exception (type , value , main_tb , limit = tb_limit )
298
+ traceback .print_exception (type_ , value , main_tb , limit = tb_limit )
299
299
300
300
# open the editor if this is a simple Exception (i.e. not KeyboardInterrupt, ...)
301
301
if isinstance (value , Exception ):
0 commit comments