Mercurial > bitten > bitten-test
changeset 55:649626cabc23
Adjust recipe module to changes to xmlio in [56].
author | cmlenz |
---|---|
date | Sun, 26 Jun 2005 17:33:29 +0000 |
parents | ef3b8f623166 |
children | 033366d81def |
files | bitten/recipe.py |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/bitten/recipe.py +++ b/bitten/recipe.py @@ -35,18 +35,18 @@ def __init__(self, elem): self._elem = elem - self.id = elem.id - self.description = elem.description + self.id = elem.attr['id'] + self.description = elem.attr.get('description') def __iter__(self): for child in self._elem: if child.namespace: # Commands - yield self._translate(child), child.attrs + yield self._translate(child), child.attr elif child.name == 'reports': # Reports for grandchild in child: - yield self._translate(grandchild), grandchild.attrs + yield self._translate(grandchild), grandchild.attr else: raise BuildError, "Unknown element <%s>" % child.name @@ -71,8 +71,7 @@ self.basedir = basedir self.path = os.path.join(basedir, filename) self.root = xmlio.parse(file(self.path, 'r')) - assert self.root.name == 'build' - self.description = self.root.attr['description'] + self.description = self.root.attr.get('description') def __iter__(self): """Provide an iterator over the individual steps of the recipe."""