Browse Source

Decode stdout from ansible-playbook before logging

We log ansible parse errors specially, but the current loop
produces a bunch of lines with b'' which isn't as nice looking
as it should be.

Change-Id: I3e62e6a938422ee02099b2dfe3e1350311c722b4
changes/62/502362/3
Monty Taylor 5 years ago
parent
commit
12f321f6a5
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
  1. 3
      zuul/executor/server.py

3
zuul/executor/server.py

@ -1617,7 +1617,8 @@ class AnsibleJob(object):
now=datetime.datetime.now()))
for line in syntax_buffer:
job_output.write("{now} | {line}\n".format(
now=datetime.datetime.now(), line=line))
now=datetime.datetime.now(),
line=line.decode('utf-8').rstrip()))
return (self.RESULT_NORMAL, ret)

Loading…
Cancel
Save