diff --git a/builders.py b/builders.py
index e4763d53..d26b7e9d 100644
--- a/builders.py
+++ b/builders.py
@@ -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():
