summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuan HE <ruan.he@orange.com>2015-11-24 14:46:25 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-11-24 14:46:25 +0000
commite5c89fa8e579665871c4ecbfb5a475c4af93b611 (patch)
tree32349d79cf4b3e04b645ffa967d7f19bca90b8f8
parent84ca8cc5a94b29eb13b300be1adaa390284e1866 (diff)
parent3f49e552962b719b1c6fa1486d4e2372849da16c (diff)
Merge "Delete the unused shell_command."
-rw-r--r--moonclient/moonclient/tests.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/moonclient/moonclient/tests.py b/moonclient/moonclient/tests.py
index 6484009f..e85c276b 100644
--- a/moonclient/moonclient/tests.py
+++ b/moonclient/moonclient/tests.py
@@ -110,15 +110,11 @@ class TestsLaunch(Lister):
if "external_command" in test:
ext_command = test["external_command"]
else:
- ext_command = test["shell_command"]
+ continue
ext_command = self.__replace_var_in_str(ext_command)
self.logfile.write("-----> {}\n".format(ext_command))
self.log.info(" \\-executing external \"{}\"".format(ext_command))
- if "external_command" in test:
- pipe = subprocess.Popen(shlex.split(ext_command), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- else:
- # Note (asteroide): security hazard! Must reduce the possible commands here.
- pipe = subprocess.Popen(ext_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ pipe = subprocess.Popen(shlex.split(ext_command), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
com = pipe.communicate()
result_str = com[0]
error_str = com[1]