From: asteroide Date: Tue, 24 Nov 2015 14:03:21 +0000 (+0100) Subject: Delete the unused shell_command. X-Git-Tag: colorado.1.0~88^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F69%2F3569%2F1;p=moon.git Delete the unused shell_command. Change-Id: I238ab36e06da03b7fd15772e2fdf70254405fd41 --- 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]