Merge pull request #40422 from github-abcde/loader_allow-partials

salt/loader.py: Allow functools.partial functions to be loaded from m…
This commit is contained in:
Mike Place 2017-03-31 09:25:26 -06:00 committed by GitHub
commit 5fff321468

View File

@ -1466,7 +1466,7 @@ class LazyLoader(salt.utils.lazy.LazyDict):
# private functions are skipped
continue
func = getattr(mod, attr)
if not inspect.isfunction(func):
if not inspect.isfunction(func) and not isinstance(func, functools.partial):
# Not a function!? Skip it!!!
continue
# Let's get the function name.