From ff1678ab301a3967744f573e22c5bcfe982d8826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Sun, 10 Mar 2013 17:17:50 +0100 Subject: [PATCH] Set shell=True in subprocess calls to allow usage of string commands (instead of lists separating command from arguments) --- octoprint/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/octoprint/server.py b/octoprint/server.py index ba807eb..11ec853 100644 --- a/octoprint/server.py +++ b/octoprint/server.py @@ -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, []))