mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Fix UnicodeError loading plugins with non-ascii in them on python3
This commit is contained in:
@@ -317,7 +317,7 @@ class PluginLoader:
|
||||
return sys.modules[name]
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("ignore", RuntimeWarning)
|
||||
with open(path, 'r') as module_file:
|
||||
with open(path, 'rb') as module_file:
|
||||
module = imp.load_source(name, path, module_file)
|
||||
return module
|
||||
|
||||
|
||||
Reference in New Issue
Block a user