fix DEBUG=1

the errors.py code was overwriting the excepthook installed in qt.py
This commit is contained in:
Damien Elmes 2017-01-08 20:30:34 +10:00
parent a172af11a1
commit 7ac1f6d3fe

View file

@ -8,6 +8,7 @@ from anki.lang import _
from aqt.qt import * from aqt.qt import *
from aqt.utils import showText, showWarning from aqt.utils import showText, showWarning
if not os.environ.get("DEBUG"):
def excepthook(etype,val,tb): def excepthook(etype,val,tb):
sys.stderr.write("Caught exception:\n%s%s\n" % ( sys.stderr.write("Caught exception:\n%s%s\n" % (
''.join(traceback.format_tb(tb)), ''.join(traceback.format_tb(tb)),