]> git.ipfire.org Git - pakfire.git/commitdiff
Fix using templates.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 12 Oct 2011 09:33:47 +0000 (11:33 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 12 Oct 2011 09:33:47 +0000 (11:33 +0200)
python/pakfire/packages/lexer.py

index dc2bc9d3694920c512f035f813c20bcf5101bc46..a9e9324f1bdba2330d483bf0458df7af7625f838 100644 (file)
@@ -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