diff --git a/slapos/grid/utils.py b/slapos/grid/utils.py
index 0eaa0d1a29f904bd39ed0aa9b22495169eb2a160..882403b1f16e10375a966c2ff66e2d168927b0f3 100644
--- a/slapos/grid/utils.py
+++ b/slapos/grid/utils.py
@@ -109,8 +109,9 @@ class SlapPopen(subprocess.Popen):
       line = self.stdout.readline()
       if line == '' and self.poll() is not None:
         break
-      output_lines.append(line)
-      logger.info(line.rstrip('\n'))
+      if line:
+        output_lines.append(line)
+        logger.info(line.rstrip('\n'))
     self.output = ''.join(output_lines)