[yum-cvs] yum/repomd repoMDObject.py,1.4,1.5
Seth Vidal
skvidal at linux.duke.edu
Thu May 25 14:34:07 UTC 2006
Update of /home/groups/yum/cvs/yum/repomd
In directory login1.linux.duke.edu:/tmp/cvs-serv30274/repomd
Modified Files:
repoMDObject.py
Log Message:
- make the checksum storage more obvious - there's no need for them to be a
list, there's no way to have more than one checksum for any specific data in
repomd.xml
Index: repoMDObject.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/repomd/repoMDObject.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- repoMDObject.py 24 May 2006 23:21:48 -0000 1.4
+++ repoMDObject.py 25 May 2006 14:34:05 -0000 1.5
@@ -29,8 +29,8 @@
def __init__(self, elem):
self.type = elem.attrib.get('type')
self.location = (None, None)
- self.checksums = [] # type,value
- self.openchecksums = [] # type,value
+ self.checksum = (None,None) # type,value
+ self.openchecksum = (None,None) # type,value
self.timestamp = None
self.parse(elem)
@@ -47,12 +47,12 @@
elif child_name == 'checksum':
csum_value = child.text
csum_type = child.attrib.get('type')
- self.checksums.append((csum_type,csum_value))
+ self.checksum = (csum_type,csum_value)
elif child_name == 'open-checksum':
csum_value = child.text
csum_type = child.attrib.get('type')
- self.openchecksums.append((csum_type, csum_value))
+ self.openchecksum = (csum_type, csum_value)
elif child_name == 'timestamp':
self.timestamp = child.text
@@ -101,13 +101,8 @@
print 'datatype: %s' % thisdata.type
print 'location: %s %s' % thisdata.location
print 'timestamp: %s' % thisdata.timestamp
- print 'checksums:'
- for (type, value) in thisdata.checksums:
- print ' %s - %s' % (type, value)
- print 'open checksums:'
- for (type, value) in thisdata.openchecksums:
- print ' %s - %s' % (type, value)
-
+ print 'checksum: %s -%s' % thisdata.checksum
+ print 'open checksum: %s - %s' % thisdata.openchecksum
def main():
More information about the Yum-cvs-commits
mailing list