mirror of
https://github.com/ansible/awx.git
synced 2026-01-10 15:32:07 -03:30
Fix multibyte character handling issue for tower_job_wait #55585
Add multibyte hostname handling test as an integration test Signed-off-by: Hideki Saito <saito@fgrep.org>
This commit is contained in:
parent
784d18705c
commit
cb354c2ef1
@ -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