fix DEBUG=1
the errors.py code was overwriting the excepthook installed in qt.py
This commit is contained in:
parent
a172af11a1
commit
7ac1f6d3fe
@ -8,11 +8,12 @@ from anki.lang import _
|
||||
from aqt.qt import *
|
||||
from aqt.utils import showText, showWarning
|
||||
|
||||
def excepthook(etype,val,tb):
|
||||
if not os.environ.get("DEBUG"):
|
||||
def excepthook(etype,val,tb):
|
||||
sys.stderr.write("Caught exception:\n%s%s\n" % (
|
||||
''.join(traceback.format_tb(tb)),
|
||||
'{0}: {1}'.format(etype, val)))
|
||||
sys.excepthook = excepthook
|
||||
sys.excepthook = excepthook
|
||||
|
||||
class ErrorHandler(QObject):
|
||||
"Catch stderr and write into buffer."
|
||||
|
Loading…
Reference in New Issue
Block a user