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']}}
start = time()
try:
p = subprocess.Popen(cmd, stderr=subprocess.PIPE)
stderr = []
while 1:
line = p.stderr.readline()
if not line:
break
stderr_write(line)
stderr.append(line)
returncode = p.wait()
end = time()
try:
p = subprocess.Popen(cmd, stderr=subprocess.PIPE)
stderr = []
while 1:
line = p.stderr.readline()
if not line:
break
stderr_write(line)
stderr.append(line)
returncode = p.wait()
finally:
end = time()
del p
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