return error code if not successful

This commit is contained in:
Rupa Schomaker 2013-05-16 12:46:34 -05:00 committed by evilhero
parent 424c3ec9a0
commit 80f6069cb4
2 changed files with 7 additions and 3 deletions

View File

@ -14,6 +14,6 @@ if len(sys.argv) < 2:
print "No folder supplied - is this being called from SABnzbd or NZBGet?"
sys.exit()
elif len(sys.argv) >= 3:
autoProcessComics.processEpisode(sys.argv[1], sys.argv[3])
sys.exit(autoProcessComics.processEpisode(sys.argv[1], sys.argv[3]))
else:
autoProcessComics.processEpisode(sys.argv[1])
sys.exit(autoProcessComics.processEpisode(sys.argv[1]))

View File

@ -80,4 +80,8 @@ def processEpisode(dirName, nzbName=None):
result = urlObj.readlines()
for line in result:
print line
if any("Post Processing SUCCESSFULL" in s for s in result):
return 0
else
return 1