Fix python3 unicode errors in executor server
These comparisons are against bytes. Change-Id: I618ff8e0c421829d32f4aa97c8d216214fc01c5f
This commit is contained in:
parent
4ab54b2d59
commit
b92b935144
|
@ -1328,7 +1328,7 @@ class AnsibleJob(object):
|
||||||
# Received abort request.
|
# Received abort request.
|
||||||
return (self.RESULT_ABORTED, None)
|
return (self.RESULT_ABORTED, None)
|
||||||
elif ret == 1:
|
elif ret == 1:
|
||||||
if syntax_buffer[0].startswith('ERROR!'):
|
if syntax_buffer[0].startswith(b'ERROR!'):
|
||||||
with open(self.jobdir.job_output_file, 'a') as job_output:
|
with open(self.jobdir.job_output_file, 'a') as job_output:
|
||||||
for line in syntax_buffer:
|
for line in syntax_buffer:
|
||||||
job_output.write("{now} | {line}\n".format(
|
job_output.write("{now} | {line}\n".format(
|
||||||
|
@ -1356,7 +1356,7 @@ class AnsibleJob(object):
|
||||||
now=datetime.datetime.now()))
|
now=datetime.datetime.now()))
|
||||||
found_marker = False
|
found_marker = False
|
||||||
for line in syntax_buffer:
|
for line in syntax_buffer:
|
||||||
if line.startswith('ERROR! Unexpected Exception'):
|
if line.startswith(b'ERROR! Unexpected Exception'):
|
||||||
found_marker = True
|
found_marker = True
|
||||||
if not found_marker:
|
if not found_marker:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue