]> git.ipfire.org Git - pakfire.git/commitdiff
Fix inherting templates.
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 28 Oct 2011 10:35:33 +0000 (12:35 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 28 Oct 2011 10:35:33 +0000 (12:35 +0200)
python/pakfire/packages/lexer.py

index 9ca0e420564e16333b1700aa4b3004e3b37cf36b..06f066cdc6b43c246fc75aa8c1825cea50ceb355 100644 (file)
@@ -684,7 +684,8 @@ class PackageLexer(TemplateLexer):
 
                # Collect all templates.
                templates = self.root.templates
-               templates.update(self.parent.templates)
+               if hasattr(self.parent, "templates"):
+                       templates.update(self.parent.templates)
 
                # Get template from parent.
                try: