[yum-cvs] yum/rpmUtils miscutils.py, 1.15.2.2, 1.15.2.3 updates.py, 1.23.2.2, 1.23.2.3

James Bowes jbowes at linux.duke.edu
Tue Dec 5 14:39:36 UTC 2006


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

Modified Files:
      Tag: yum-3_0_X
	miscutils.py updates.py 
Log Message:
Pychecker fixes back again, less the brokenness

Index: miscutils.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/rpmUtils/miscutils.py,v
retrieving revision 1.15.2.2
retrieving revision 1.15.2.3
diff -u -r1.15.2.2 -r1.15.2.3
--- miscutils.py	5 Dec 2006 14:03:33 -0000	1.15.2.2
+++ miscutils.py	5 Dec 2006 14:39:34 -0000	1.15.2.3
@@ -15,7 +15,6 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 # Copyright 2003 Duke University
 
-import string
 import rpm
 import types
 import gzip
@@ -240,16 +239,16 @@
     if filename[-4:] == '.rpm':
         filename = filename[:-4]
        
-    archIndex = string.rfind(filename, '.')
+    archIndex = filename.rfind('.')
     arch = filename[archIndex+1:]
 
-    relIndex = string.rfind(filename[:archIndex], '-')
+    relIndex = filename[:archIndex].rfind('-')
     rel = filename[relIndex+1:archIndex]
 
-    verIndex = string.rfind(filename[:relIndex], '-')
+    verIndex = filename[:relIndex].rfind('-')
     ver = filename[verIndex+1:relIndex]
 
-    epochIndex = string.find(filename, ':')
+    epochIndex = filename.find(':')
     if epochIndex == -1:
         epoch = ''
     else:
@@ -313,16 +312,16 @@
 def stringToVersion(verstring):
     if verstring is None:
         return ('0', None, None)
-    i = string.find(verstring, ':')
+    i = verstring.find(':')
     if i != -1:
         try:
-            epoch = string.atol(verstring[:i])
+            epoch = long(verstring[:i])
         except ValueError:
             # look, garbage in the epoch field, how fun, kill it
             epoch = '0' # this is our fallback, deal
     else:
         epoch = '0'
-    j = string.find(verstring, '-')
+    j = verstring.find('-')
     if j != -1:
         if verstring[i + 1:j] == '':
             version = None

Index: updates.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/rpmUtils/updates.py,v
retrieving revision 1.23.2.2
retrieving revision 1.23.2.3
diff -u -r1.23.2.2 -r1.23.2.3
--- updates.py	5 Dec 2006 14:03:33 -0000	1.23.2.2
+++ updates.py	5 Dec 2006 14:39:34 -0000	1.23.2.3
@@ -14,9 +14,9 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 # Copyright 2004 Duke University
 
+import rpmUtils
 import rpmUtils.miscutils
 import rpmUtils.arch
-import rpmUtils
 
 class Updates:
     """This class computes and keeps track of updates and obsoletes.




More information about the Yum-cvs-commits mailing list