Fix namespacing of modules in dependency dict

This commit is contained in:
Thomas Jackson 2015-02-02 12:29:16 -08:00
parent 132008ef5c
commit 6cd7cee87b
2 changed files with 3 additions and 2 deletions

View File

@ -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):

View File

@ -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)