mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Loader optimzation
Use a str.join instead of str.format to make the full function name.
This commit is contained in:
parent
7bed68743e
commit
c750662946
1 changed files with 5 additions and 1 deletions
|
@ -1416,8 +1416,12 @@ class LazyLoader(salt.utils.lazy.LazyDict):
|
|||
# It default's of course to the found callable attribute name
|
||||
# if no alias is defined.
|
||||
funcname = getattr(mod, '__func_alias__', {}).get(attr, attr)
|
||||
try:
|
||||
full_funcname = '.'.join((module_name, funcname))
|
||||
except TypeError:
|
||||
full_funcname = '{0}.{1}'.format(module_name, funcname)
|
||||
# Save many references for lookups
|
||||
self._dict['{0}.{1}'.format(module_name, funcname)] = func
|
||||
self._dict[full_funcname] = func
|
||||
setattr(mod_dict, funcname, func)
|
||||
mod_dict[funcname] = func
|
||||
self._apply_outputter(func, mod)
|
||||
|
|
Loading…
Add table
Reference in a new issue