Fix ansible tasks on python3

The ansible task would be reading the stdout from pipe to know when
that finished. The stopping sentinel for that reading was a binary empty
That was failing on python3 making it hang and consume 100% cpu
Changed the inter sentinel to empty space that works for both
python 2 and 3.

The issue is mentioned on a downstream bug
https://bugzilla.redhat.com/show_bug.cgi?id=1686397

Change-Id: If12c573430ddbd13243003fc16d7cdabf394fb7b
This commit is contained in:
apetrich 2019-03-07 14:23:27 +01:00
parent c8a1690cee
commit 7b0c621ee4
1 changed files with 1 additions and 1 deletions

View File

@ -567,7 +567,7 @@ class AnsiblePlaybookAction(base.TripleOAction):
start = time.time()
stdout = []
lines = []
for line in iter(process.stdout.readline, b''):
for line in iter(process.stdout.readline, ''):
lines.append(line)
if not self.trash_output:
stdout.append(line)