mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-01-05 11:08:08 +00:00
Set default values for sys.stdout if they're unavailable
This commit is contained in:
parent
83ed8561ee
commit
31e933207f
1 changed files with 6 additions and 0 deletions
|
@ -2,6 +2,12 @@
|
||||||
import os
|
import os
|
||||||
import signal
|
import signal
|
||||||
import sys
|
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 logging
|
||||||
import threading
|
import threading
|
||||||
import warnings
|
import warnings
|
||||||
|
|
Loading…
Reference in a new issue