* 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.filename = filenm
|
||||||
self.compressionType = ctype
|
self.compressionType = ctype
|
||||||
|
|
||||||
def __init__(node):
|
def __init__(self, node):
|
||||||
self.getNodeText(node)
|
self.filename = getNodeText(node)
|
||||||
|
self.compressionType = getNodeAttribute(node, "compressionType")
|
||||||
|
|
||||||
class SpecFile(XmlFile):
|
class SpecFile(XmlFile):
|
||||||
"""A class for reading/writing from/to a PSPEC (PISI SPEC) file."""
|
"""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.archiveType = getNodeAttribute(archiveNode, "archType")
|
||||||
self.archiveHash = getNodeAttribute(archiveNode, "md5sum")
|
self.archiveHash = getNodeAttribute(archiveNode, "md5sum")
|
||||||
patchElts = self.getChildElts("PSPEC/Source/Patches")
|
patchElts = self.getChildElts("PSPEC/Source/Patches")
|
||||||
#patches = [ for p in patchesNode ]
|
patches = [ PatchInfo(p) for p in patchElts ]
|
||||||
for p in patchElts:
|
for x in patches:
|
||||||
print getNodeText(p)
|
print "fn:", x.filename
|
||||||
|
print "ct:", x.compressionType
|
||||||
|
|
||||||
def verify(self):
|
def verify(self):
|
||||||
"""Verify PSPEC structures, are they what we want of them?"""
|
"""Verify PSPEC structures, are they what we want of them?"""
|
||||||
|
|||||||
Reference in New Issue
Block a user