From ae5644ba91c36b475d46bb24f4b6368b137f4f04 Mon Sep 17 00:00:00 2001 From: echel0n Date: Thu, 28 Aug 2014 22:30:30 -0700 Subject: [PATCH] Fix for migrating to new newznab provider config format --- sickbeard/providers/__init__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sickbeard/providers/__init__.py b/sickbeard/providers/__init__.py index 45ee4d60..3ae9c75d 100755 --- a/sickbeard/providers/__init__.py +++ b/sickbeard/providers/__init__.py @@ -115,12 +115,16 @@ def makeNewznabProvider(configString): try: name, url, key, catIDs, enabled, search_mode, search_fallback, enable_daily, enable_backlog = configString.split( '|') - except ValueError, e: + except ValueError: try: - name, url, key, catIDs, enabled = configString.split('|') + name, url, key, catIDs, enabled, search_mode, search_fallback, enable_backlog = configString.split( + '|') except ValueError: - logger.log(u"Skipping Newznab provider string: '" + configString + "', incorrect format", logger.ERROR) - return None + try: + name, url, key, catIDs, enabled = configString.split('|') + except ValueError: + logger.log(u"Skipping Newznab provider string: '" + configString + "', incorrect format", logger.ERROR) + return None newznab = sys.modules['sickbeard.providers.newznab']