From a3484d2c1662d0183953db8f84f00314a49ab7ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Thu, 21 Nov 2019 23:23:02 -0500 Subject: [PATCH] Fix for restart after update from source on github. --- bazarr/check_update.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bazarr/check_update.py b/bazarr/check_update.py index aa8f8c624..d9dd3faa9 100644 --- a/bazarr/check_update.py +++ b/bazarr/check_update.py @@ -294,10 +294,11 @@ def request_json(url, **kwargs): def updated(restart=True): if settings.general.getboolean('update_restart') and restart: try: - from main import restart - restart() - except: - logging.info('BAZARR Restart failed, please restart Bazarr manualy') + requests.get('http://127.0.0.1:' + settings.general.port + settings.general.base_url + 'restart') + except requests.ConnectionError: + pass + except (requests.ConnectTimeout, requests.HTTPError, requests.ReadTimeout, requests.Timeout): + logging.info('BAZARR Restart failed, please restart Bazarr manually') updated(restart=False) else: database.execute("UPDATE system SET updated='1'")