Added check for stdout being defined.

This commit is contained in:
Zachary Cook 2020-02-14 13:02:56 -05:00 committed by GitHub
parent 507459660e
commit 1b72577f88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,7 +162,7 @@ sys.excepthook = exceptHook
# Enable dumping traceback for all threads
if sys.stderr:
faulthandler.enable(file = sys.stderr, all_threads = True)
else:
elif sys.stdout:
faulthandler.enable(file = sys.stdout, all_threads = True)
# Workaround for a race condition on certain systems where there