A bit of cleanup, and call subprocess.Popen with shell=True.

This commit is contained in:
Shyotl
2014-09-01 00:47:39 -05:00
parent 8e45003c27
commit 992bbbba1c
3 changed files with 6 additions and 6 deletions

View File

@@ -394,14 +394,14 @@ class LLManifest(object):
debugging/informational purpoases, prints out the command's
output as it is received."""
print "Running command:", command
fd = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
fd = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
lines = []
while True:
lines.append(fd.stdout.readline().rstrip('\n'))
lines.append(fd.stdout.readline())
if lines[-1] == '':
break
else:
print lines[-1],
print lines[-1].rstrip('\n'),
output = ''.join(lines)
if fd.returncode:
raise RuntimeError(