Skip to content

Commit

Permalink
catch Arr NotFounds
Browse files Browse the repository at this point in the history
  • Loading branch information
meisnate12 committed Dec 29, 2021
1 parent 8f6960e commit 4e54942
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions modules/radarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
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")

Expand Down Expand Up @@ -107,7 +107,7 @@ def add_tmdb(self, tmdb_ids, **options):
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:
Expand Down
4 changes: 2 additions & 2 deletions modules/sonarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
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")

Expand Down Expand Up @@ -133,7 +133,7 @@ def add_tvdb(self, tvdb_ids, **options):
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:
Expand Down

0 comments on commit 4e54942

Please sign in to comment.