add check for running instance. Fixes #466

This commit is contained in:
clinton-hall 2014-07-09 13:11:36 +09:30
commit 8a58dedd1d
6 changed files with 93 additions and 7 deletions

View file

@ -722,12 +722,14 @@ def main(args, section=None):
if result == 0:
logger.info("The %s script completed successfully." % args[0])
if os.environ.has_key('NZBOP_SCRIPTDIR'): # return code for nzbget v11
del nzbtomedia.MYAPP
return (nzbtomedia.NZBGET_POSTPROCESS_SUCCESS)
else:
logger.error("A problem was reported in the %s script." % args[0])
if os.environ.has_key('NZBOP_SCRIPTDIR'): # return code for nzbget v11
del nzbtomedia.MYAPP
return (nzbtomedia.NZBGET_POSTPROCESS_ERROR)
del nzbtomedia.MYAPP
return (result)