mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #24832 from jacksontj/2015.5
Don't incur a "_load_all" of the lazy_loader while looking for mod_init.
This commit is contained in:
commit
31d4c131e9
1 changed files with 3 additions and 1 deletions
|
@ -608,9 +608,11 @@ class State(object):
|
|||
of a state package that has a mod_init function, then execute the
|
||||
mod_init function in the state module.
|
||||
'''
|
||||
# ensure that the module is loaded
|
||||
self.states['{0}.{1}'.format(low['state'], low['fun'])] # pylint: disable=W0106
|
||||
minit = '{0}.mod_init'.format(low['state'])
|
||||
if low['state'] not in self.mod_init:
|
||||
if minit in self.states:
|
||||
if minit in self.states._dict:
|
||||
mret = self.states[minit](low)
|
||||
if not mret:
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue