Fix shutdown before file_server started

This commit is contained in:
shortcutme 2019-04-15 16:07:18 +02:00
parent bfc5e2dce6
commit c7ea66bfef
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -14,10 +14,9 @@ last_error = None
def shutdown(reason="Unknown"):
logging.info("Shutting down (reason: %s)..." % reason)
import main
if "file_server" in dir(main) and main.file_server.running:
if "file_server" in dir(main):
try:
if "file_server" in dir(main):
gevent.spawn(main.file_server.stop)
gevent.spawn(main.file_server.stop)
if "ui_server" in dir(main):
gevent.spawn(main.ui_server.stop)
except Exception as err: