1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Use a unicode format string so that we don't convert to byte strings

Fixes #14349
This commit is contained in:
Toshio Kuratomi 2016-02-26 08:59:49 -08:00
parent 3518a05db6
commit ef8bec18bf
2 changed files with 3 additions and 2 deletions

View file

@ -27,6 +27,7 @@ from ansible import constants as C
from ansible.executor.task_queue_manager import TaskQueueManager
from ansible.playbook import Playbook
from ansible.template import Templar
from ansible.utils.unicode import to_unicode
try:
from __main__ import display
@ -81,7 +82,7 @@ class PlaybookExecutor:
i = 1
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:
if play._included_path is not None:

View file

@ -66,7 +66,7 @@ class AnsibleConstructor(Constructor):
"found unacceptable key (%s)" % exc, key_node.start_mark)
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)
mapping[key] = value