diff --git a/pisi/specfile.py b/pisi/specfile.py index abb20f7d..e3069a04 100644 --- a/pisi/specfile.py +++ b/pisi/specfile.py @@ -47,7 +47,7 @@ class UpdateInfo: node = xml.newNode("Update") xml.addTextNodeUnder(node, "Date", self.date) xml.addTextNodeUnder(node, "Version", self.version) - xml.addTextNodeUndeR(node, "Release", self.release) + xml.addTextNodeUnder(node, "Release", self.release) return node class PathInfo: @@ -83,12 +83,12 @@ class PackageInfo: xml.addTextNodeUnder(node, "Summary", self.summary) xml.addTextNodeUnder(node, "Description", self.description) xml.addTextNodeUnder(node, "Category", self.category) - for dep in map(lambda x : x.elt(self), self.installDeps): - self.addNode("Source/InstallDependencies", dep) - for dep in map(lambda x : x.elt(self), self.runtimeDeps): - self.addNode("Source/RuntimeDependencies", dep) - for path in map(lambda x : x.elt(self), self.paths): - self.addNode("Files", dep) + for dep in map(lambda x : x.elt(xml), self.installDeps): + xml.addNode("Source/InstallDependencies", dep) + for dep in map(lambda x : x.elt(xml), self.runtimeDeps): + xml.addNode("Source/RuntimeDependencies", dep) + for path in map(lambda x : x.elt(xml), self.paths): + xml.addNode("Files", dep) return node class SpecFile(XmlFile): diff --git a/pisi/xmlext.py b/pisi/xmlext.py index 792606b7..7598dd65 100644 --- a/pisi/xmlext.py +++ b/pisi/xmlext.py @@ -39,7 +39,8 @@ def getChildElts(node): def getNode(node, tagpath): """returns the *first* matching node for given tag path.""" - + + assert type(tagpath)==str tags = tagpath.split('/') assert len(tags)>0 @@ -108,7 +109,8 @@ def addTagPath(dom, node, tags, newnode=None): def addNode(dom, node, tagpath, newnode = None): """add a new node at the end of the tree""" - + + assert type(tagpath)==str tags = tagpath.split('/') # tag chain assert len(tags)>0 # we want a chain diff --git a/pisi/xmlfile.py b/pisi/xmlfile.py index 7ca448f0..9d893afa 100644 --- a/pisi/xmlfile.py +++ b/pisi/xmlfile.py @@ -112,7 +112,6 @@ class XmlFile(object): def addTextNodeUnder(self, node, tagPath, text): "add a text node under given node with tag path (phew)" - node = self.addNodeUnder(tagPath, self.newTextNode(text)) - return node + return self.addNodeUnder(node, tagPath, self.newTextNode(text))