From 930998374c6da8179f976b80c4437f5be8847cdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Fri, 10 Jun 2005 17:32:39 +0000 Subject: [PATCH] * specfile: patches are retrieved using the new functions --- src/specfile.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/specfile.py b/src/specfile.py index 59b38390..3de5d079 100644 --- a/src/specfile.py +++ b/src/specfile.py @@ -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?"""