From 4e5494206929491b5ef5a3187e0f14bd6f0b9216 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Wed, 29 Dec 2021 14:52:19 -0500 Subject: [PATCH] catch Arr NotFounds --- modules/radarr.py | 4 ++-- modules/sonarr.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/radarr.py b/modules/radarr.py index 652653f1..66607e94 100644 --- a/modules/radarr.py +++ b/modules/radarr.py @@ -2,7 +2,7 @@ import logging from modules import util from modules.util import Failed from arrapi import RadarrAPI -from arrapi.exceptions import ArrException, Invalid +from arrapi.exceptions import ArrException, Invalid, NotFound logger = logging.getLogger("Plex Meta Manager") @@ -107,7 +107,7 @@ class Radarr: exists.extend(_e) invalid.extend(_i) movies = [] - except Invalid as e: + except (Invalid, NotFound) as e: raise Failed(f"Radarr Error: {e}") if len(added) > 0: diff --git a/modules/sonarr.py b/modules/sonarr.py index f9f143d5..c1101656 100644 --- a/modules/sonarr.py +++ b/modules/sonarr.py @@ -2,7 +2,7 @@ import logging from modules import util from modules.util import Failed from arrapi import SonarrAPI -from arrapi.exceptions import ArrException, Invalid +from arrapi.exceptions import ArrException, Invalid, NotFound logger = logging.getLogger("Plex Meta Manager") @@ -133,7 +133,7 @@ class Sonarr: exists.extend(_e) invalid.extend(_i) shows = [] - except Invalid as e: + except (Invalid, NotFound) as e: raise Failed(f"Sonarr Error: {e}") if len(added) > 0: