mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 20:31:27 -07:00
Not native, but text (#55676)
* use to_text instead of to_native * cleaned up some imports and other pyflakisms * fix missing lib messages
This commit is contained in:
parent
6e66ea9f78
commit
27dcf8aaab
12 changed files with 33 additions and 35 deletions
|
@ -10,7 +10,6 @@ __metaclass__ = type
|
|||
import glob
|
||||
import os
|
||||
import os.path
|
||||
import pkgutil
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
|
@ -56,7 +55,7 @@ def add_all_plugin_dirs(path):
|
|||
if os.path.isdir(plugin_path):
|
||||
obj.add_directory(to_text(plugin_path))
|
||||
else:
|
||||
display.warning("Ignoring invalid path provided to plugin path: '%s' is not a directory" % to_native(path))
|
||||
display.warning("Ignoring invalid path provided to plugin path: '%s' is not a directory" % to_text(path))
|
||||
|
||||
|
||||
def get_shell_plugin(shell_type=None, executable=None):
|
||||
|
@ -522,7 +521,7 @@ class PluginLoader:
|
|||
if isinstance(ex, AnsibleError):
|
||||
raise
|
||||
# log and continue, likely an innocuous type/package loading failure in collections import
|
||||
display.debug('has_plugin error: {0}'.format(to_native(ex)))
|
||||
display.debug('has_plugin error: {0}'.format(to_text(ex)))
|
||||
|
||||
__contains__ = has_plugin
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue