mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Create regdata before try/except (#34931)
This commit is contained in:
parent
e1a6ebac3a
commit
cdc9882f83
@ -47,12 +47,12 @@ class ThorState(salt.state.HighState):
|
||||
|
||||
self.returners = salt.loader.returners(self.opts, {})
|
||||
self.reg_ret = self.opts.get('register_returner', None)
|
||||
regdata = {}
|
||||
if self.reg_ret is not None:
|
||||
try:
|
||||
regdata = self.returners['{0}.load_reg'.format(self.reg_ret)]()
|
||||
except Exception as exc:
|
||||
log.error(exc)
|
||||
regdata = {}
|
||||
|
||||
self.state.inject_globals = {'__reg__': regdata}
|
||||
self.event = salt.utils.event.get_master_event(
|
||||
|
Loading…
Reference in New Issue
Block a user