Set shell=True in subprocess calls to allow usage of string commands (instead of lists separating command from arguments)
parent
eb3832b028
commit
ff1678ab30
|
@ -427,7 +427,7 @@ def performSystemAction():
|
||||||
if availableAction["action"] == action:
|
if availableAction["action"] == action:
|
||||||
logger.info("Performing command: %s" % availableAction["command"])
|
logger.info("Performing command: %s" % availableAction["command"])
|
||||||
try:
|
try:
|
||||||
subprocess.check_output(availableAction["command"])
|
subprocess.check_output(availableAction["command"], shell=True)
|
||||||
except subprocess.CalledProcessError, e:
|
except subprocess.CalledProcessError, e:
|
||||||
logger.warn("Command failed with return code %i: %s" % (e.returncode, e.message))
|
logger.warn("Command failed with return code %i: %s" % (e.returncode, e.message))
|
||||||
return app.make_response(("Command failed with return code %i: %s" % (e.returncode, e.message), 500, []))
|
return app.make_response(("Command failed with return code %i: %s" % (e.returncode, e.message), 500, []))
|
||||||
|
|
Loading…
Reference in New Issue