mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-26 17:47:20 +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.
|
# 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
|
||||||
|
|
Loading…
Reference in a new issue