From 1cdec282029cd6870f45e51401ac1d6200ddcaf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Tue, 12 Feb 2019 07:19:48 -0500 Subject: [PATCH] Catch sooner if gevent is not installed. --- bazarr/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bazarr/main.py b/bazarr/main.py index d2d3e67a9..07be4b7ec 100644 --- a/bazarr/main.py +++ b/bazarr/main.py @@ -5,9 +5,12 @@ bazarr_version = '0.7.2' # Try to import gevent and exit if it's not available. This one is required to use websocket. try: from gevent import monkey -except ImportError as e: +except ImportError: + import logging logging.exception('BAZARR require gevent Python module to be installed using pip.') try: + import os + from get_args import args stop_file = open(os.path.join(args.config_dir, "bazarr.stop"), "w") except Exception as e: logging.error('BAZARR Cannot create bazarr.stop file.')