Don't display greenlet errors twice

This commit is contained in:
shortcutme 2018-01-19 02:24:29 +01:00
parent b0a125c113
commit 6d644922d5
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -34,7 +34,8 @@ def handleError(*args):
return return
if not silent and args[0].__name__ != "Notify": if not silent and args[0].__name__ != "Notify":
logging.exception("Unhandled exception") logging.exception("Unhandled exception")
sys.__excepthook__(*args) if "greenlet.py" not in args[2].tb_frame.f_code.co_filename: # Don't display error twice
sys.__excepthook__(*args)
# Ignore notify errors # Ignore notify errors