Fix loader condition

This commit is contained in:
Mike Place 2014-06-05 13:57:00 -06:00
parent b8d0842fe1
commit e91c23d494

View File

@ -778,8 +778,9 @@ class Loader(object):
for mod in self.modules:
if not hasattr(mod, '__salt__'):
mod.__salt__ = funcs
elif not in_pack(pack, '__salt__') and \
str(mod.__name__).startswith('salt.loaded.int.grain'):
elif hasattr(mod, '__salt__') or (not in_pack(pack, '__salt__') and \
str(mod.__name__).startswith('salt.loaded.int.grain')
):
mod.__salt__.update(funcs)
else:
mod.__salt__ = funcs