mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #20357 from cachedout/pillar_compile
Don't try to compile empty pillars
This commit is contained in:
commit
bf8d519221
@ -217,17 +217,19 @@ class Pillar(object):
|
|||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
for saltenv in self._get_envs():
|
for saltenv in self._get_envs():
|
||||||
tops[saltenv].append(
|
top = self.client.cache_file(
|
||||||
compile_template(
|
self.opts['state_top'],
|
||||||
self.client.cache_file(
|
saltenv
|
||||||
self.opts['state_top'],
|
|
||||||
saltenv
|
|
||||||
),
|
|
||||||
self.rend,
|
|
||||||
self.opts['renderer'],
|
|
||||||
saltenv=saltenv
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
if top:
|
||||||
|
tops[saltenv].append(
|
||||||
|
compile_template(
|
||||||
|
top,
|
||||||
|
self.rend,
|
||||||
|
self.opts['renderer'],
|
||||||
|
saltenv=saltenv
|
||||||
|
)
|
||||||
|
)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
errors.append(
|
errors.append(
|
||||||
('Rendering Primary Top file failed, render error:\n{0}'
|
('Rendering Primary Top file failed, render error:\n{0}'
|
||||||
|
Loading…
Reference in New Issue
Block a user