Commit e7976887 authored by Julien Muchembled's avatar Julien Muchembled

rina: fix UnboundLocalError when the 'build-rina' test suite fails too early

parent 81e95395
...@@ -132,16 +132,18 @@ location = {{parameter_dict['slapos_package']}} ...@@ -132,16 +132,18 @@ location = {{parameter_dict['slapos_package']}}
start = time() start = time()
try: try:
p = subprocess.Popen(cmd, stderr=subprocess.PIPE) try:
stderr = [] p = subprocess.Popen(cmd, stderr=subprocess.PIPE)
while 1: stderr = []
line = p.stderr.readline() while 1:
if not line: line = p.stderr.readline()
break if not line:
stderr_write(line) break
stderr.append(line) stderr_write(line)
returncode = p.wait() stderr.append(line)
end = time() returncode = p.wait()
finally:
end = time()
del p del p
if returncode: if returncode:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment