From 10a9b34f9ef16d213feabb19270b9f66c7d83fcb Mon Sep 17 00:00:00 2001 From: David Moreau-Simard Date: Fri, 6 Oct 2017 10:21:26 -0400 Subject: [PATCH] Properly format messages coming out of emitPlaybookBanner In I7e34206d7968bf128e140468b9a222ecbce3a8f1 we modified how messages are printed for the playbook banner (and now, footer). The message wasn't formatted properly due to the lack of assignment. Additionally, we need to add a line break after these messages, otherwise the next message starts on the same line. Change-Id: I808d8908815ffa5fae409e600308dfb9ff9c6e77 --- zuul/executor/server.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zuul/executor/server.py b/zuul/executor/server.py index 82921fb641..f040fd5603 100644 --- a/zuul/executor/server.py +++ b/zuul/executor/server.py @@ -1759,15 +1759,15 @@ class AnsibleJob(object): if result is not None: result = self.RESULT_MAP[result] msg = "{phase} {step} {result}: [{trusted} : {playbook}@{branch}]" - msg.format(phase=phase, step=step, result=result, - trusted=trusted, playbook=playbook, branch=branch) + msg = msg.format(phase=phase, step=step, result=result, + trusted=trusted, playbook=playbook, branch=branch) else: msg = "{phase} {step}: [{trusted} : {playbook}@{branch}]" - msg.format(phase=phase, step=step, trusted=trusted, - playbook=playbook, branch=branch) + msg = msg.format(phase=phase, step=step, trusted=trusted, + playbook=playbook, branch=branch) with open(self.jobdir.job_output_file, 'a') as job_output: - job_output.write("{now} | {msg}".format( + job_output.write("{now} | {msg}\n".format( now=datetime.datetime.now(), msg=msg))