mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-12-17 18:17:10 +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 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
|
||||
|
|
Loading…
Reference in a new issue