mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-26 09:37:25 +00:00
Continuing development
This commit is contained in:
parent
046f4e652b
commit
ad4a63cb5b
1 changed files with 10 additions and 4 deletions
|
@ -50,10 +50,16 @@ else:
|
|||
# Install gevent under user directory if it'S not already available. This one is required to use websocket.
|
||||
try:
|
||||
import gevent
|
||||
except ImportError:
|
||||
from pip._internal import main as pipmain
|
||||
pipmain(['install', '--user', 'gevent'])
|
||||
import gevent
|
||||
except ImportError as e:
|
||||
logging.exception('BAZARR require gevent Python module to be installed using pip.')
|
||||
try:
|
||||
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 geventwebsocket import WebSocketError
|
||||
|
|
Loading…
Reference in a new issue