From 33bb570277119d6b325b51eb1d555f9992ff2f59 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 13 Apr 2019 19:45:27 +0530 Subject: [PATCH] ... --- src/calibre/gui2/main_window.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/calibre/gui2/main_window.py b/src/calibre/gui2/main_window.py index 72deb1ce10..d8a3ad83f2 100644 --- a/src/calibre/gui2/main_window.py +++ b/src/calibre/gui2/main_window.py @@ -130,8 +130,8 @@ class MainWindow(QMainWindow): def set_exception_handler(self): sys.excepthook = ExceptionHandler(self) - def unhandled_exception(self, type, value, tb): - if type is KeyboardInterrupt: + def unhandled_exception(self, exc_type, value, tb): + if exc_type is KeyboardInterrupt: return import traceback try: @@ -141,13 +141,13 @@ class MainWindow(QMainWindow): print_basic_debug_info(out=sio) except: pass - traceback.print_exception(type, value, tb, file=sio) + traceback.print_exception(exc_type, value, tb, file=sio) if getattr(value, 'locking_debug_msg', None): prints(value.locking_debug_msg, file=sio) fe = sio.getvalue() prints(fe, file=sys.stderr) fe = force_unicode(fe) - msg = '%s:'%type.__name__ + as_unicode(value) + msg = '%s:'%exc_type.__name__ + as_unicode(value) error_dialog(self, _('Unhandled exception'), msg, det_msg=fe, show=True) except BaseException: