always use excepthook.py under win (isatty() is not supported)
This commit is contained in:
parent
d848e71d3b
commit
4d024667fd
|
@ -27,6 +27,7 @@
|
||||||
##
|
##
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
import traceback
|
import traceback
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
|
@ -102,7 +103,8 @@ def _info(type, value, tb):
|
||||||
|
|
||||||
_exception_in_progress.release()
|
_exception_in_progress.release()
|
||||||
|
|
||||||
if not sys.stderr.isatty(): # gdb/kdm etc if we use startx this is not True
|
# gdb/kdm etc if we use startx this is not True
|
||||||
|
if os.name == 'nt' or not sys.stderr.isatty():
|
||||||
#FIXME: maybe always show dialog?
|
#FIXME: maybe always show dialog?
|
||||||
_excepthook_save = sys.excepthook
|
_excepthook_save = sys.excepthook
|
||||||
sys.excepthook = _info
|
sys.excepthook = _info
|
||||||
|
|
Loading…
Reference in New Issue