* specfile: patches are retrieved using the new functions

This commit is contained in:
Eray Özkural
2005-06-10 17:32:39 +00:00
parent 65b5da279b
commit 930998374c
+7 -5
View File
@@ -9,8 +9,9 @@ class PatchInfo:
self.filename = filenm
self.compressionType = ctype
def __init__(node):
self.getNodeText(node)
def __init__(self, node):
self.filename = getNodeText(node)
self.compressionType = getNodeAttribute(node, "compressionType")
class SpecFile(XmlFile):
"""A class for reading/writing from/to a PSPEC (PISI SPEC) file."""
@@ -24,9 +25,10 @@ class SpecFile(XmlFile):
self.archiveType = getNodeAttribute(archiveNode, "archType")
self.archiveHash = getNodeAttribute(archiveNode, "md5sum")
patchElts = self.getChildElts("PSPEC/Source/Patches")
#patches = [ for p in patchesNode ]
for p in patchElts:
print getNodeText(p)
patches = [ PatchInfo(p) for p in patchElts ]
for x in patches:
print "fn:", x.filename
print "ct:", x.compressionType
def verify(self):
"""Verify PSPEC structures, are they what we want of them?"""