diff --git a/lib/server/masterd.py b/lib/server/masterd.py
index 1ef5480f1f1a88342fe767e37bde244487a7ed27..9ca39e61a10a9108fb3a52339d8ee56843e86a4e 100644
--- a/lib/server/masterd.py
+++ b/lib/server/masterd.py
@@ -71,12 +71,13 @@ def _LogNewJob(status, info, ops):
   """Log information about a recently submitted job.
 
   """
+  op_summary = utils.CommaJoin(op.Summary() for op in ops)
+
   if status:
-    logging.info("New job with id %s, summary: %s",
-                 info, utils.CommaJoin(op.Summary() for op in ops))
+    logging.info("New job with id %s, summary: %s", info, op_summary)
   else:
     logging.info("Failed to submit job, reason: '%s', summary: %s",
-                 info, utils.CommaJoin(op.Summary() for op in ops))
+                 info, op_summary)
 
 
 class ClientRequestWorker(workerpool.BaseWorker):