Only report unhandled errors if excepthook is the default

This commit is contained in:
Kovid Goyal 2019-12-04 23:10:30 +05:30
parent 1c13f9634c
commit 605857e276
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -88,7 +88,7 @@ if __name__ == '__main__':
try:
main()
except Exception:
if sys.gui_app:
if sys.gui_app and sys.excepthook == sys.__excepthook__:
import traceback
import calibre_os_module
calibre_os_module.gui_error_message(