mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Encoding fixes for plugin loader and vault. (#51002)
This commit is contained in:
parent
9fa46e7f94
commit
a864247bd5
2 changed files with 3 additions and 3 deletions
|
@ -234,7 +234,7 @@ class CLI(with_metaclass(ABCMeta, object)):
|
|||
try:
|
||||
file_vault_secret.load()
|
||||
except AnsibleError as exc:
|
||||
display.warning('Error in vault password file loading (%s): %s' % (vault_id_name, exc))
|
||||
display.warning('Error in vault password file loading (%s): %s' % (vault_id_name, to_text(exc)))
|
||||
raise
|
||||
|
||||
if vault_id_name:
|
||||
|
|
|
@ -352,7 +352,7 @@ class PluginLoader:
|
|||
warnings.simplefilter("ignore", RuntimeWarning)
|
||||
with open(to_bytes(path), 'rb') as module_file:
|
||||
# to_native is used here because imp.load_source's path is for tracebacks and python's traceback formatting uses native strings
|
||||
module = imp.load_source(full_name, to_native(path), module_file)
|
||||
module = imp.load_source(to_native(full_name), to_native(path), module_file)
|
||||
return module
|
||||
|
||||
def _update_object(self, obj, name, path):
|
||||
|
@ -622,7 +622,7 @@ def _load_plugin_filter():
|
|||
if 'stat' in filters['ansible.modules']:
|
||||
raise AnsibleError('The stat module was specified in the module blacklist file, {0}, but'
|
||||
' Ansible will not function without the stat module. Please remove stat'
|
||||
' from the blacklist.'.format(filter_cfg))
|
||||
' from the blacklist.'.format(to_native(filter_cfg)))
|
||||
return filters
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue