mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-16 18:59:39 +08:00
Also check if streams are not closed
SmartAvionics found that this was a safer way to be able to write to these streams. See comments on commit 2eab2c0f3dbe3153cc704ca9e396cd78b0ebbf9d.
This commit is contained in:
parent
7e2177a8cd
commit
d84bc5c682
@ -170,9 +170,9 @@ def exceptHook(hook_type, value, traceback):
|
|||||||
# Set exception hook to use the crash dialog handler
|
# Set exception hook to use the crash dialog handler
|
||||||
sys.excepthook = exceptHook
|
sys.excepthook = exceptHook
|
||||||
# Enable dumping traceback for all threads
|
# Enable dumping traceback for all threads
|
||||||
if sys.stderr:
|
if sys.stderr and not sys.stderr.closed:
|
||||||
faulthandler.enable(file = sys.stderr, all_threads = True)
|
faulthandler.enable(file = sys.stderr, all_threads = True)
|
||||||
elif sys.stdout:
|
elif sys.stdout and not sys.stdout.closed:
|
||||||
faulthandler.enable(file = sys.stdout, all_threads = True)
|
faulthandler.enable(file = sys.stdout, all_threads = True)
|
||||||
|
|
||||||
from cura.CuraApplication import CuraApplication
|
from cura.CuraApplication import CuraApplication
|
||||||
|
Loading…
x
Reference in New Issue
Block a user