saltext.vault.utils.functools¶
Fixed namespaced_function from salt.utils.functools
- saltext.vault.utils.functools.namespaced_function(function, global_dict)[source]¶
Patched function taken from salt.utils.functools. It does not set kwdefaults.
Redefine (clone) a function under a different globals() namespace scope.
Any keys missing in the passed
global_dictthat is present in the passed function__globals__attribute get’s copied over intoglobal_dict, thus avoidingNameErrorfrom modules imported in the original function module.