catch Arr NotFounds

pull/556/head
meisnate12 3 years ago
parent 8f6960e811
commit 4e54942069

@ -2,7 +2,7 @@ import logging
from modules import util from modules import util
from modules.util import Failed from modules.util import Failed
from arrapi import RadarrAPI from arrapi import RadarrAPI
from arrapi.exceptions import ArrException, Invalid from arrapi.exceptions import ArrException, Invalid, NotFound
logger = logging.getLogger("Plex Meta Manager") logger = logging.getLogger("Plex Meta Manager")
@ -107,7 +107,7 @@ class Radarr:
exists.extend(_e) exists.extend(_e)
invalid.extend(_i) invalid.extend(_i)
movies = [] movies = []
except Invalid as e: except (Invalid, NotFound) as e:
raise Failed(f"Radarr Error: {e}") raise Failed(f"Radarr Error: {e}")
if len(added) > 0: if len(added) > 0:

@ -2,7 +2,7 @@ import logging
from modules import util from modules import util
from modules.util import Failed from modules.util import Failed
from arrapi import SonarrAPI from arrapi import SonarrAPI
from arrapi.exceptions import ArrException, Invalid from arrapi.exceptions import ArrException, Invalid, NotFound
logger = logging.getLogger("Plex Meta Manager") logger = logging.getLogger("Plex Meta Manager")
@ -133,7 +133,7 @@ class Sonarr:
exists.extend(_e) exists.extend(_e)
invalid.extend(_i) invalid.extend(_i)
shows = [] shows = []
except Invalid as e: except (Invalid, NotFound) as e:
raise Failed(f"Sonarr Error: {e}") raise Failed(f"Sonarr Error: {e}")
if len(added) > 0: if len(added) > 0:

Loading…
Cancel
Save