Merge pull request #20357 from cachedout/pillar_compile

Don't try to compile empty pillars
This commit is contained in:
Thomas S Hatch 2015-02-05 13:53:32 -07:00
commit bf8d519221

View File

@ -217,17 +217,19 @@ class Pillar(object):
]
else:
for saltenv in self._get_envs():
tops[saltenv].append(
compile_template(
self.client.cache_file(
self.opts['state_top'],
saltenv
),
self.rend,
self.opts['renderer'],
saltenv=saltenv
)
top = self.client.cache_file(
self.opts['state_top'],
saltenv
)
if top:
tops[saltenv].append(
compile_template(
top,
self.rend,
self.opts['renderer'],
saltenv=saltenv
)
)
except Exception as exc:
errors.append(
('Rendering Primary Top file failed, render error:\n{0}'