From 070e1ba55b74f2d5cbf41602c690cdf55fb0576c Mon Sep 17 00:00:00 2001 From: Dustyn Gibson <miigotu@gmail.com> Date: Thu, 24 Sep 2015 18:19:55 -0700 Subject: [PATCH] Restore was only processed when console logging was enabled! --- SickBeard.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/SickBeard.py b/SickBeard.py index f6ed7ef2c..2d9df1f15 100755 --- a/SickBeard.py +++ b/SickBeard.py @@ -295,15 +295,11 @@ class SickRage(object): os.chdir(sickbeard.DATA_DIR) # Check if we need to perform a restore first - try: - restoreDir = os.path.join(sickbeard.DATA_DIR, 'restore') - if self.consoleLogging and os.path.exists(restoreDir): - if self.restoreDB(restoreDir, sickbeard.DATA_DIR): - sys.stdout.write("Restore: restoring DB and config.ini successful...\n") - else: - sys.stdout.write("Restore: restoring DB and config.ini FAILED!\n") - except Exception: - sys.stdout.write("Restore: restoring DB and config.ini FAILED!\n") + restoreDir = os.path.join(sickbeard.DATA_DIR, 'restore') + if os.path.exists(restoreDir): + success = self.restoreDB(restoreDir, sickbeard.DATA_DIR) + if self.consoleLogging: + sys.stdout.write("Restore: restoring DB and config.ini %s!\n" % ("FAILED", "SUCCESSFUL")[success]) # Load the config and publish it to the sickbeard package if self.consoleLogging and not os.path.isfile(sickbeard.CONFIG_FILE): -- GitLab