mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-04 01:33:09 +00:00
Add comment explaining to_native usage.
This commit is contained in:
@@ -351,6 +351,7 @@ class PluginLoader:
|
||||
with warnings.catch_warnings():
|
||||
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)
|
||||
return module
|
||||
|
||||
|
||||
Reference in New Issue
Block a user