diff options
author | Ghostkeeper <rubend@tutanota.com> | 2020-02-26 15:48:27 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2020-02-26 15:48:27 +0300 |
commit | d84bc5c682ff2d532d6315707cbf91638dbc840d (patch) | |
tree | 17d9aa786fb603aa8d7602927b83c64af155f53f /cura_app.py | |
parent | 7e2177a8cd080aff0ea0815d410d41aa0cb554ba (diff) |
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.
Diffstat (limited to 'cura_app.py')
-rwxr-xr-x | cura_app.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cura_app.py b/cura_app.py index 38d1149080..2358108845 100755 --- a/cura_app.py +++ b/cura_app.py @@ -170,9 +170,9 @@ def exceptHook(hook_type, value, traceback): # Set exception hook to use the crash dialog handler sys.excepthook = exceptHook # 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) -elif sys.stdout: +elif sys.stdout and not sys.stdout.closed: faulthandler.enable(file = sys.stdout, all_threads = True) from cura.CuraApplication import CuraApplication |