mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 05:29:26 -02: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:
@@ -87,7 +87,9 @@ status:
|
|||||||
|
|
||||||
|
|
||||||
from ..module_utils.ansible_tower import TowerModule, tower_auth_config, tower_check_mode
|
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 ansible.module_utils.six.moves import cStringIO as StringIO
|
||||||
|
from codecs import getwriter
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -123,7 +125,10 @@ def main():
|
|||||||
|
|
||||||
# tower-cli gets very noisy when monitoring.
|
# tower-cli gets very noisy when monitoring.
|
||||||
# We pass in our our outfile to suppress the out during our monitor call.
|
# 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
|
params['outfile'] = outfile
|
||||||
|
|
||||||
job_id = params.get('job_id')
|
job_id = params.get('job_id')
|
||||||
|
|||||||
Reference in New Issue
Block a user