From cdc9882f83d2132b735c137503a6b39927b7c670 Mon Sep 17 00:00:00 2001 From: Joseph Hall Date: Tue, 26 Jul 2016 09:05:24 -0600 Subject: [PATCH] Create regdata before try/except (#34931) --- salt/thorium/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/thorium/__init__.py b/salt/thorium/__init__.py index 56d3e3f2fc..a6e7ff5e89 100644 --- a/salt/thorium/__init__.py +++ b/salt/thorium/__init__.py @@ -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(