forked from ungleich-public/cdist
only run gencode scripts if they exist
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
d37ca88752
commit
773d325afa
1 changed files with 10 additions and 9 deletions
|
@ -95,6 +95,7 @@ class Code(object):
|
||||||
def _run_gencode(self, cdist_object, which):
|
def _run_gencode(self, cdist_object, which):
|
||||||
cdist_type = cdist_object.type
|
cdist_type = cdist_object.type
|
||||||
script = os.path.join(self.local.type_path, getattr(cdist_type, 'gencode_%s_path' % which))
|
script = os.path.join(self.local.type_path, getattr(cdist_type, 'gencode_%s_path' % which))
|
||||||
|
if os.path.isfile(script):
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env.update(self.env)
|
env.update(self.env)
|
||||||
env.update({
|
env.update({
|
||||||
|
|
Loading…
Reference in a new issue