From 1e10af1dfa93622926c9b38fb5b16c5f7367795a Mon Sep 17 00:00:00 2001 From: Alex Bartol Date: Wed, 12 Oct 2016 13:21:11 -0400 Subject: [PATCH 1/2] subprocess.Popen requires a list not string and will fail with a complicated string of parameters. Using shlex to preserve quoted strings --- pom.xml | 2 +- src/main/python/install_shield_builder.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 238cb2f..c5a2bf8 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ org.jenkins-ci.plugins python-wrapper - 1.0.3 + 1.0.4 diff --git a/src/main/python/install_shield_builder.py b/src/main/python/install_shield_builder.py index 49ff36f..0d4670e 100644 --- a/src/main/python/install_shield_builder.py +++ b/src/main/python/install_shield_builder.py @@ -1,6 +1,7 @@ #!/usr/bin/env jython import subprocess +import shlex import hudson.model.Computer as Computer import hudson.Util as Util @@ -79,7 +80,8 @@ def perform(build, launcher, listener): command += ' ' + arguments # launch InstallShield builder (ISCmdBld.exe) logger.println("Executing command: " + command) - popen = subprocess.Popen(command, shell=False, + command_list = shlex.split(command) + popen = subprocess.Popen(command_list, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (stdoutdata, stderrdata) = popen.communicate() for line in stdoutdata.splitlines(): From 7cb199238ef63b0f387428a575d390fb8bea990b Mon Sep 17 00:00:00 2001 From: Alex Bartol Date: Fri, 28 Oct 2016 14:48:01 -0400 Subject: [PATCH 2/2] Reverted python-wrapper version to correct number --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c5a2bf8..238cb2f 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ org.jenkins-ci.plugins python-wrapper - 1.0.4 + 1.0.3