Fix sys_path propagation for builtins load_module
This commit is contained in:
1 parent
aa40ef3140
commit
6780eba157
4 files changed
+9
-8
No files matched your search
@@ -118,8 +118,9 @@ def create_access(evaluator, obj):
|
||||
return evaluator.compiled_subprocess.get_or_create_access_handle(obj)
|
||||
|
||||
|
||||
def load_module(evaluator, path=None, name=None):
|
||||
sys_path = list(evaluator.project.sys_path)
|
||||
def load_module(evaluator, path=None, name=None, sys_path=None):
|
||||
if sys_path is None:
|
||||
sys_path = list(evaluator.project.sys_path)
|
||||
if path is not None:
|
||||
dotted_path = dotted_from_fs_path(path, sys_path=sys_path)
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user