mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
modify loader call method to use self.module_dirs
This commit is contained in:
parent
1ed0eeb110
commit
c2c6683a3a
@ -82,11 +82,11 @@ class Loader(object):
|
||||
'''
|
||||
name = fun[:fun.rindex('.')]
|
||||
try:
|
||||
fn_, path, desc = imp.find_module(name, module_dirs)
|
||||
fn_, path, desc = imp.find_module(name, self.module_dirs)
|
||||
mod = imp.load_module(name, fn_, path, desc)
|
||||
except ImportError:
|
||||
# The module was not found, try to find a cython module
|
||||
for mod_dir in module_dirs:
|
||||
for mod_dir in self.module_dirs:
|
||||
for fn_ in os.listdir(mod_dir):
|
||||
if name == fn_[:fn_.rindex('.')]:
|
||||
# Found it, load the mod and break the loop
|
||||
|
Loading…
Reference in New Issue
Block a user