mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07: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 2eab2c0f3d.
This commit is contained in:
parent
7e2177a8cd
commit
d84bc5c682
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue