mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-30 03:28:26 -07:00
Unquote and test result as string. Fix #185
This commit is contained in:
parent
51fb494496
commit
d707a738be
1 changed files with 4 additions and 4 deletions
|
@ -276,13 +276,13 @@ def external_script(outputDestination):
|
||||||
command = [user_script]
|
command = [user_script]
|
||||||
for param in user_script_param:
|
for param in user_script_param:
|
||||||
if param == "FN":
|
if param == "FN":
|
||||||
command.append('"' + file + '"')
|
command.append(file)
|
||||||
continue
|
continue
|
||||||
elif param == "FP":
|
elif param == "FP":
|
||||||
command.append('"' + filePath + '"')
|
command.append(filePath)
|
||||||
continue
|
continue
|
||||||
elif param == "DN":
|
elif param == "DN":
|
||||||
command.append('"' + dirpath + '"')
|
command.append(dirpath)
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
command.append(param)
|
command.append(param)
|
||||||
|
@ -291,7 +291,7 @@ def external_script(outputDestination):
|
||||||
try:
|
try:
|
||||||
p = Popen(command)
|
p = Popen(command)
|
||||||
res = p.wait()
|
res = p.wait()
|
||||||
if res in user_script_successCodes: # Linux returns 0 for successful.
|
if str(res) in user_script_successCodes: # Linux returns 0 for successful.
|
||||||
Logger.info("UserScript %s was successfull", command[0])
|
Logger.info("UserScript %s was successfull", command[0])
|
||||||
else:
|
else:
|
||||||
Logger.error("UserScript %s has failed with return code: %s", command[0], res)
|
Logger.error("UserScript %s has failed with return code: %s", command[0], res)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue