Skip to content

Commit

Permalink
Redirect stderr logs in runcommandinshell python call
Browse files Browse the repository at this point in the history
Change-Id: I2deef059f66e48888969f06cbba5ac23b01a7ab2
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/6158
Reviewed-by: Anish Swaminathan <[email protected]>
Tested-by: Anish Swaminathan <[email protected]>
  • Loading branch information
suezzelur committed Nov 13, 2018
1 parent ebe812e commit 68068c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion support/package-builder/CommandUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def findFile(filename, sourcePath):
def runCommandInShell(cmd, logfile=None, logfn=None):
retval = 0
if logfn:
process = subprocess.Popen("%s" %cmd, shell=True, stdout=subprocess.PIPE)
process = subprocess.Popen("%s" %cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
retval = process.wait()
logfn(process.communicate()[0].decode())
else:
Expand Down

0 comments on commit 68068c1

Please sign in to comment.