Use a unicode format string so that we don't convert to byte strings
Fixes #14349
This commit is contained in:
parent
3518a05db6
commit
ef8bec18bf
2 changed files with 3 additions and 2 deletions
|
@ -27,6 +27,7 @@ from ansible import constants as C
|
||||||
from ansible.executor.task_queue_manager import TaskQueueManager
|
from ansible.executor.task_queue_manager import TaskQueueManager
|
||||||
from ansible.playbook import Playbook
|
from ansible.playbook import Playbook
|
||||||
from ansible.template import Templar
|
from ansible.template import Templar
|
||||||
|
from ansible.utils.unicode import to_unicode
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from __main__ import display
|
from __main__ import display
|
||||||
|
@ -81,7 +82,7 @@ class PlaybookExecutor:
|
||||||
|
|
||||||
i = 1
|
i = 1
|
||||||
plays = pb.get_plays()
|
plays = pb.get_plays()
|
||||||
display.vv('%d plays in %s' % (len(plays), playbook_path))
|
display.vv(u'%d plays in %s' % (len(plays), to_unicode(playbook_path)))
|
||||||
|
|
||||||
for play in plays:
|
for play in plays:
|
||||||
if play._included_path is not None:
|
if play._included_path is not None:
|
||||||
|
|
|
@ -66,7 +66,7 @@ class AnsibleConstructor(Constructor):
|
||||||
"found unacceptable key (%s)" % exc, key_node.start_mark)
|
"found unacceptable key (%s)" % exc, key_node.start_mark)
|
||||||
|
|
||||||
if key in mapping:
|
if key in mapping:
|
||||||
display.warning('While constructing a mapping from {1}, line {2}, column {3}, found a duplicate dict key ({0}). Using last defined value only.'.format(key, *mapping.ansible_pos))
|
display.warning(u'While constructing a mapping from {1}, line {2}, column {3}, found a duplicate dict key ({0}). Using last defined value only.'.format(key, *mapping.ansible_pos))
|
||||||
|
|
||||||
value = self.construct_object(value_node, deep=deep)
|
value = self.construct_object(value_node, deep=deep)
|
||||||
mapping[key] = value
|
mapping[key] = value
|
||||||
|
|
Loading…
Reference in a new issue