@@ -79,12 +79,13 @@ def canStartBuild(builder, wfb, request):
threshold = threshold * 1024 *1024 * 1024
cmd = yield shell("findmnt -T %s --df -n --bytes | awk '{print $5}'" % mountpoint, wfb.worker, builder)
- if int(cmd.stdout) < threshold:
- log.msg("Detected {0} GB of space available on {1}, less than threshold of {2} GB. Can't start build".format(cmd.stdout, name, threshold))
+ space = int(cmd.stdout.strip())
+ if space < threshold:
+ log.msg("Detected {0} GB of space available on {1}, less than threshold of {2} GB. Can't start build".format(space, name, threshold))
wfb.worker.quarantine_timeout = 10 * 60
wfb.worker.putInQuarantine()
return False
- log.msg("Detected {0} GB of space available for {1}, more than threshold of {2} GB".format(cmd.stdout, name, threshold))
+ log.msg("Detected {0} GB of space available for {1}, more than threshold of {2} GB".format(space, name, threshold))
log.msg("OK to build")
if wfb.worker.isPaused():
The log messages contained newlines which made the logs hard to read. Tweak the code to avoid this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- builders.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)