Skip to content

Commit 7477a8e

Browse files
committed
catch string error
1 parent 1122cc3 commit 7477a8e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

postRadarr.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ def downloadedMoviesScanInProgress(baseURL, headers, moviefile_sourcefolder, log
7676
log.debug(commands)
7777
log.debug(moviefile_sourcefolder)
7878
for c in commands:
79-
if c.get('name') == "DownloadedMoviesScan":
80-
try:
79+
try:
80+
if c.get('name') == "DownloadedMoviesScan":
8181
if c['body']['path'] == moviefile_sourcefolder and c['status'] == 'started':
8282
log.debug("Found a matching path scan in progress %s." % (moviefile_sourcefolder))
8383
return c['id']
84-
except:
85-
pass
84+
except:
85+
pass
8686
log.debug("No commands in progress for %s." % (moviefile_sourcefolder))
8787
return None
8888

postSonarr.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ def downloadedEpisodesScanInProgress(baseURL, headers, episodefile_sourcefolder,
7777
log.debug(commands)
7878
log.debug(episodefile_sourcefolder)
7979
for c in commands:
80-
if c.get('name') == "DownloadedEpisodesScan":
81-
try:
80+
try:
81+
if c.get('name') == "DownloadedEpisodesScan":
8282
if c['body']['path'] == episodefile_sourcefolder and c['status'] == 'started':
8383
log.debug("Found a matching path scan in progress %s." % (episodefile_sourcefolder))
8484
return c['id']
85-
except:
86-
pass
85+
except:
86+
pass
8787
log.debug("No commands in progress for %s." % (episodefile_sourcefolder))
8888
return None
8989

0 commit comments

Comments
 (0)