Set default values for sys.stdout if they're unavailable

This commit is contained in:
sabaimran 2023-07-12 22:22:49 -07:00
parent 83ed8561ee
commit 31e933207f

View file

@ -2,6 +2,12 @@
import os
import signal
import sys
if sys.stdout is None:
sys.stdout = open(os.devnull, "w")
if sys.stderr is None:
sys.stderr = open(os.devnull, "w")
import logging
import threading
import warnings