From 0371036177724078b66dfd6e8e55ca4b1112583e Mon Sep 17 00:00:00 2001 From: Clinton Hall Date: Fri, 29 Nov 2013 20:34:18 +1030 Subject: [PATCH] Stop hang on result check. Fix #185 --- TorrentToMedia.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/TorrentToMedia.py b/TorrentToMedia.py index cca18765..17f64b10 100755 --- a/TorrentToMedia.py +++ b/TorrentToMedia.py @@ -299,13 +299,14 @@ def external_script(outputDestination): res = p.wait() if str(res) in user_script_successCodes: # Linux returns 0 for successful. Logger.info("UserScript %s was successfull", command[0]) + result = int(0) else: - Logger.error("UserScript %s has failed with return code: %s", command[0], res) - Logger.info("If the UserScript completed successfully you should add %s to the user_script_successCodes", res) - result = 1 + Logger.error("UserScript %s has failed with return code: %s", command[0], res) + Logger.info("If the UserScript completed successfully you should add %s to the user_script_successCodes", res) + result = int(1) except: Logger.exception("UserScript %s has failed", command[0]) - result = 1 + result = int(1) final_result = final_result + result time.sleep(user_delay)