[yum-cvs] yum/yum mdparser.py,1.7,1.8

Jeremy Katz katzj at linux.duke.edu
Tue Dec 5 20:57:12 UTC 2006


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

Modified Files:
	mdparser.py 
Log Message:
jbowes (rightfully) points out that this can be even simpler


Index: mdparser.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/mdparser.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- mdparser.py	5 Dec 2006 20:42:19 -0000	1.7
+++ mdparser.py	5 Dec 2006 20:57:10 -0000	1.8
@@ -52,11 +52,7 @@
             raise ValueError('Unknown repodata type "%s" in %s' % (
                 elem.tag, filename))
         # Get the total number of packages
-        total = elem.get('packages', None)
-        if total is not None:
-            self.total = int(total)
-        else:
-            self.total = 0
+        self.total = int(elem.get('packages', 0))
 
     def __iter__(self):
         return self




More information about the Yum-cvs-commits mailing list