mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Fix namespacing of modules in dependency dict
This commit is contained in:
parent
132008ef5c
commit
6cd7cee87b
@ -1060,7 +1060,7 @@ class NewLazyLoader(salt.utils.lazy.LazyDict):
|
||||
self._dict.update(funcs)
|
||||
|
||||
# enforce depends
|
||||
Depends.enforce_dependencies(self._dict, self.loaded_base_name)
|
||||
Depends.enforce_dependencies(self._dict, self.tag)
|
||||
return True
|
||||
|
||||
def _load(self, key):
|
||||
|
@ -62,7 +62,8 @@ class Depends(object):
|
||||
class wide depandancy_dict
|
||||
'''
|
||||
module = inspect.getmodule(inspect.stack()[1][0])
|
||||
kind = module.__name__.split('.', 1)[0]
|
||||
# module name is something like salt.loaded.int.modules.test
|
||||
kind = module.__name__.rsplit('.', 2)[1]
|
||||
for dep in self.dependencies:
|
||||
self.dependency_dict[kind][dep].add(
|
||||
(module, function, self.fallback_function)
|
||||
|
Loading…
Reference in New Issue
Block a user