From 411bea7d4ea028e4d5d2be4cea2a468055a01b3b Mon Sep 17 00:00:00 2001 From: Will Woods Date: Mon, 9 May 2011 23:45:35 -0400 Subject: [PATCH] treebuilder fixup: use directories param for LoraxTemplate --- src/pylorax/treebuilder.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pylorax/treebuilder.py b/src/pylorax/treebuilder.py index 8a0e986b..a1a0e7da 100644 --- a/src/pylorax/treebuilder.py +++ b/src/pylorax/treebuilder.py @@ -67,11 +67,12 @@ def _exists(root, p): return (len(glob.glob(p)) > 0) class BaseBuilder(object): - def __init__(self, product, arch, inroot, outroot): + def __init__(self, product, arch, inroot, outroot, templatedir=None): self.arch = arch self.product = product self.inroot = inroot self.outroot = outroot + self.templatedir = templatedir self.runner = None def getdefaults(self): @@ -83,7 +84,7 @@ class BaseBuilder(object): def runtemplate(self, templatefile, **variables): for k,v in self.getdefaults().items(): variables.setdefault(k,v) # setdefault won't override existing args - t = LoraxTemplate() + t = LoraxTemplate(directories=[self.templatedir]) logger.info("parsing %s with the following variables", templatefile) for key, val in variables.items(): logger.info(" %s: %s", key, val)