mirror of
https://github.com/ansible/awx.git
synced 2026-01-10 15:32:07 -03:30
Merge pull request #5170 from AlanCoding/py2_fix2
Fix multibyte character handling issue for tower_job_wait #55585 Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
6567ad612c
@ -87,7 +87,9 @@ status:
|
||||
|
||||
|
||||
from ..module_utils.ansible_tower import TowerModule, tower_auth_config, tower_check_mode
|
||||
from ansible.module_utils.six import PY2
|
||||
from ansible.module_utils.six.moves import cStringIO as StringIO
|
||||
from codecs import getwriter
|
||||
|
||||
|
||||
try:
|
||||
@ -123,7 +125,10 @@ def main():
|
||||
|
||||
# tower-cli gets very noisy when monitoring.
|
||||
# We pass in our our outfile to suppress the out during our monitor call.
|
||||
outfile = StringIO()
|
||||
if PY2:
|
||||
outfile = getwriter('utf-8')(StringIO())
|
||||
else:
|
||||
outfile = StringIO()
|
||||
params['outfile'] = outfile
|
||||
|
||||
job_id = params.get('job_id')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user