Set shell=True in subprocess calls to allow usage of string commands (instead of lists separating command from arguments)

master
Gina Häußge 2013-03-10 17:17:50 +01:00
parent eb3832b028
commit ff1678ab30
1 changed files with 1 additions and 1 deletions

View File

@ -427,7 +427,7 @@ def performSystemAction():
if availableAction["action"] == action:
logger.info("Performing command: %s" % availableAction["command"])
try:
subprocess.check_output(availableAction["command"])
subprocess.check_output(availableAction["command"], shell=True)
except subprocess.CalledProcessError, e:
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, []))