mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Fix several things causing tracebacks with unicode cwd (#27731)
Fixes #27511
This commit is contained in:
committed by
Sam Doran
parent
181b31e282
commit
3f12fccd02
@@ -35,7 +35,7 @@ __metaclass__ = type
|
||||
import os
|
||||
from ansible import constants as C
|
||||
from ansible.errors import AnsibleParserError
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible.module_utils._text import to_bytes, to_native, to_text
|
||||
from ansible.plugins.vars import BaseVarsPlugin
|
||||
from ansible.inventory.host import Host
|
||||
from ansible.inventory.group import Group
|
||||
@@ -87,7 +87,7 @@ class VarsModule(BaseVarsPlugin):
|
||||
data = combine_vars(data, new_data)
|
||||
|
||||
except Exception as e:
|
||||
raise AnsibleParserError(to_text(e))
|
||||
raise AnsibleParserError(to_native(e))
|
||||
return data
|
||||
|
||||
def _find_vars_files(self, path, name):
|
||||
|
||||
Reference in New Issue
Block a user