Add comment explaining to_native usage.
This commit is contained in:
parent
53a640f2cc
commit
54867b4add
1 changed files with 1 additions and 0 deletions
|
@ -351,6 +351,7 @@ class PluginLoader:
|
||||||
with warnings.catch_warnings():
|
with warnings.catch_warnings():
|
||||||
warnings.simplefilter("ignore", RuntimeWarning)
|
warnings.simplefilter("ignore", RuntimeWarning)
|
||||||
with open(to_bytes(path), 'rb') as module_file:
|
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(full_name, to_native(path), module_file)
|
||||||
return module
|
return module
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue