From 8d3150cfc6c41e31980fe83feabbaeb068c2aefc Mon Sep 17 00:00:00 2001 From: Labrys of Knossos Date: Sat, 15 Dec 2018 21:14:33 -0500 Subject: [PATCH] Fix fork detection in Python 3 --- core/nzbToMediaAutoFork.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/nzbToMediaAutoFork.py b/core/nzbToMediaAutoFork.py index ba3fab2f..7dfdc3b6 100644 --- a/core/nzbToMediaAutoFork.py +++ b/core/nzbToMediaAutoFork.py @@ -23,8 +23,8 @@ def autoFork(section, inputCategory): replace = {'sickrage':'SickRage', 'sickchill':'SickChill', 'sickgear':'SickGear', 'medusa':'Medusa', 'sickbeard-api':'SickBeard-api'} f1 = replace[cfg.get("fork", "auto")] if cfg.get("fork", "auto") in replace else cfg.get("fork", "auto") try: - fork = core.FORKS.items()[core.FORKS.keys().index(f1)] - except: + fork = f1, core.FORKS[f1] + except KeyError: fork = "auto" protocol = "https://" if ssl else "http://"