make code setup debug env

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-10-14 23:04:19 +02:00
parent dd05a9b0d7
commit bc85237eaa
2 changed files with 4 additions and 1 deletions

View file

@ -170,7 +170,7 @@ __debug::
If this variable is setup, cdist runs in debug mode.
You can use this information, to only output stuff in debug
mode as well.
Available for: initial manifest, type manifest
Available for: initial manifest, type manifest, gencode, code
__explorer::
Directory that contains all global explorers.
Available for: explorer

View file

@ -92,6 +92,9 @@ class Code(object):
'__global': self.local.out_path,
}
if log.getEffectiveLevel() == logging.DEBUG:
self.env.update({'__debug': "yes" })
def _run_gencode(self, cdist_object, which):
cdist_type = cdist_object.type
script = os.path.join(self.local.type_path, getattr(cdist_type, 'gencode_%s_path' % which))