<not-in-commit-message>
This is the new version of the patch. The old one was wrong as it fixed
only the case of our placeholder class.
</not-in-commit-message>
Addons should only return the contents for their %addon sections, not
also the '%addon ADDON_NAME' and '%end' special lines.
---
pyanaconda/addons.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/addons.py b/pyanaconda/addons.py
index 412e43a..a9246a6 100644
--- a/pyanaconda/addons.py
+++ b/pyanaconda/addons.py
@@ -74,7 +74,8 @@ class AddonRegistry(object):
self.__dict__ = dictionary
def __str__(self):
- return reduce(lambda acc,(id, addon): acc + str(addon),
+ tmpl = "%%addon %s\n%s\n%%end"
+ return reduce(lambda acc,(id, addon): acc + tmpl % (addon.name, str(addon)),
self.__dict__.iteritems(), "")
# pylint: disable-msg=C0103
@@ -112,7 +113,7 @@ class AddonData(object):
self.content = ""
def __str__(self):
- return "%%addon %s\n%s%%end\n" % (self.name, self.content)
+ return self.content
# pylint: disable-msg=C0103
def setup(self, storage, ksdata, instClass):
--
1.7.11.7