1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 22:40:12 +01:00

Ensure end of buildserver output is always captured

This commit is contained in:
Ciaran Gultnieks 2013-11-13 18:45:37 +00:00
parent 17f6e4d169
commit cd8bd62e0b

View File

@ -332,10 +332,16 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, force):
error += chan.recv_stderr(1024)
print "...getting exit status"
returncode = chan.recv_exit_status()
while chan.recv_ready():
output += chan.recv(1024)
while chan.recv_stderr_ready():
error += chan.recv_stderr(1024)
while True:
get = chan.recv(1024)
if len(get) == 0:
break
output += get
while True:
get = chan.recv_stderr(1024)
if len(get) == 0:
break
error += get
if returncode != 0:
raise BuildException("Build.py failed on server for %s:%s" % (app['id'], thisbuild['version']), output, error)