From 78fcfd43cd7ce6e2f97f15a94395f00d26a04dd4 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Mon, 10 Dec 2012 15:30:32 +0100 Subject: [PATCH] masterd: Remove duplicate code Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: Helga Velroyen <helgav@google.com> --- lib/server/masterd.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/server/masterd.py b/lib/server/masterd.py index 1ef5480f1..9ca39e61a 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): -- GitLab