From: Michael Tremer Date: Wed, 12 Oct 2011 09:33:47 +0000 (+0200) Subject: Fix using templates. X-Git-Tag: 0.9.14~3^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d0f00bdae44f45f31a4cee30e17a5810fa4076d0;p=pakfire.git Fix using templates. --- diff --git a/python/pakfire/packages/lexer.py b/python/pakfire/packages/lexer.py index dc2bc9d36..a9e9324f1 100644 --- a/python/pakfire/packages/lexer.py +++ b/python/pakfire/packages/lexer.py @@ -673,9 +673,13 @@ class PackageLexer(TemplateLexer): if not self._template: return None + # Collect all templates. + templates = self.root.templates + templates.update(self.parent.templates) + # Get template from parent. try: - return self.parent.templates[self._template] + return templates[self._template] except KeyError: raise LexerError, "Template does not exist: %s" % self._template