From d0f00bdae44f45f31a4cee30e17a5810fa4076d0 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 12 Oct 2011 11:33:47 +0200 Subject: [PATCH] Fix using templates. --- python/pakfire/packages/lexer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.39.5