minor update
This commit is contained in:
@@ -23,12 +23,14 @@ def execute(command):
|
|||||||
process = subprocess.Popen(command, stdout=subprocess.PIPE)
|
process = subprocess.Popen(command, stdout=subprocess.PIPE)
|
||||||
while True:
|
while True:
|
||||||
output = process.stdout.readline()
|
output = process.stdout.readline()
|
||||||
if output == '' and process.poll() is not None:
|
|
||||||
break
|
|
||||||
if output:
|
if output:
|
||||||
print output.strip()
|
line = output.decode('ascii').rstrip()
|
||||||
sys.stdout.flush()
|
print(">>> " + line)
|
||||||
return process.returncode
|
process.stdout.flush()
|
||||||
|
ret = process.poll()
|
||||||
|
if ret is not None:
|
||||||
|
return ret
|
||||||
|
return -1
|
||||||
|
|
||||||
def main(argv):
|
def main(argv):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user