1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-26 17:47:20 +00:00

Continuing development

This commit is contained in:
morpheus65535 2018-12-17 19:38:59 -05:00
parent 046f4e652b
commit ad4a63cb5b

View file

@ -50,10 +50,16 @@ else:
# Install gevent under user directory if it'S not already available. This one is required to use websocket. # Install gevent under user directory if it'S not already available. This one is required to use websocket.
try: try:
import gevent import gevent
except ImportError: except ImportError as e:
from pip._internal import main as pipmain logging.exception('BAZARR require gevent Python module to be installed using pip.')
pipmain(['install', '--user', 'gevent']) try:
import gevent stop_file = open(os.path.join(config_dir, "bazarr.stop"), "w")
except Exception as e:
logging.error('BAZARR Cannot create bazarr.stop file.')
else:
stop_file.write('')
stop_file.close()
os._exit(0)
from gevent.pywsgi import WSGIServer from gevent.pywsgi import WSGIServer
from geventwebsocket import WebSocketError from geventwebsocket import WebSocketError