[yum-cvs] yum/yum packages.py,1.49,1.50

Jack Neely slack at linux.duke.edu
Wed Jul 5 18:58:21 UTC 2006


Update of /home/groups/yum/cvs/yum/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv28251/yum

Modified Files:
	packages.py 
Log Message:
Make seth's eyes not bleed and replace the list comps.  Oh the temptation
to use map() was strong.


Index: packages.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/packages.py,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- packages.py	5 Jul 2006 18:43:02 -0000	1.49
+++ packages.py	5 Jul 2006 18:58:19 -0000	1.50
@@ -508,10 +508,16 @@
             name = self.hdr[getattr(rpm, 'RPMTAG_%sNAME' % tag)]
 
             list = self.hdr[getattr(rpm, 'RPMTAG_%sFLAGS' % tag)]
-            flag = [ rpmUtils.miscutils.flagToString(i) for i in list ]
+            flag = []
+            for i in list:
+                value = rpmUtils.miscutils.flagToString(i)
+                flag.append(value)
 
             list = self.hdr[getattr(rpm, 'RPMTAG_%sVERSION' % tag)]
-            vers = [ rpmUtils.miscutils.stringToVersion(i) for i in list ]
+            vers = []
+            for i in list:
+                value = rpmUtils.miscutils.stringToVersion(i)
+                vers.append(value)
 
             prcotype = tag.lower() + 's'
             if name is not None:




More information about the Yum-cvs-commits mailing list