fix for linux

This commit is contained in:
Colombo 2020-02-29 14:36:10 +04:00
parent 5eca4958b7
commit dbf28eeebf

View file

@ -357,6 +357,14 @@ class InteractBase(object):
return result
def input_process(self, stdin_fd, sq, str):
import sys
if sys.platform != 'win32':
# fix for Linux , Ignoring :
# /usr/lib/python3.6/multiprocessing/semaphore_tracker.py:143:
# UserWarning: semaphore_tracker: There appear to be 1 leaked semaphores to clean up at shutdown
import warnings
warnings.simplefilter(action='ignore', category=UserWarning)
sys.stdin = os.fdopen(stdin_fd)
try:
inp = input (str)