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

Convert playbook basedir into unicode at the borders

This commit is contained in:
Toshio Kuratomi 2016-11-21 07:02:03 -08:00
parent 8ee3ef587a
commit 0b96d61162

View file

@ -21,11 +21,12 @@ __metaclass__ = type
import os import os
from ansible import constants as C
from ansible.errors import AnsibleParserError from ansible.errors import AnsibleParserError
from ansible.module_utils._text import to_text
from ansible.playbook.play import Play from ansible.playbook.play import Play
from ansible.playbook.playbook_include import PlaybookInclude from ansible.playbook.playbook_include import PlaybookInclude
from ansible.plugins import get_all_plugin_loaders from ansible.plugins import get_all_plugin_loaders
from ansible import constants as C
try: try:
from __main__ import display from __main__ import display
@ -43,7 +44,7 @@ class Playbook:
# Entries in the datastructure of a playbook may # Entries in the datastructure of a playbook may
# be either a play or an include statement # be either a play or an include statement
self._entries = [] self._entries = []
self._basedir = os.getcwd() self._basedir = to_text(os.getcwd(), errors='surrogate_or_strict')
self._loader = loader self._loader = loader
self._file_name = None self._file_name = None