* specfile: patches are retrieved using the new functions
This commit is contained in:
+7
-5
@@ -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?"""
|
||||
|
||||
Reference in New Issue
Block a user