[yum-cvs] yum/rpmUtils miscutils.py, 1.15, 1.15.2.1 updates.py, 1.23, 1.23.2.1
James Bowes
jbowes at linux.duke.edu
Tue Dec 5 00:44:28 UTC 2006
- Previous message: [yum-cvs] yum/bin yum-updatesd.py,1.1,1.1.2.1 yum.py,1.7,1.7.4.1
- Next message: [yum-cvs] yum callback.py, 1.29, 1.29.2.1 cli.py, 1.241.2.4, 1.241.2.5 output.py, 1.72.2.1, 1.72.2.2 progress_meter.py, 1.3, 1.3.6.1 shell.py, 1.33.2.1, 1.33.2.2 yum-updatesd.py, 1.22.2.5, 1.22.2.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/groups/yum/cvs/yum/rpmUtils
In directory login1.linux.duke.edu:/tmp/cvs-serv792/rpmUtils
Modified Files:
Tag: yum-3_0_X
miscutils.py updates.py
Log Message:
pychecker related fixes, including unused imports, and removal of use of deprecated methods from the string module
Index: miscutils.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/rpmUtils/miscutils.py,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -u -r1.15 -r1.15.2.1
--- miscutils.py 6 Sep 2006 04:45:22 -0000 1.15
+++ miscutils.py 5 Dec 2006 00:44:26 -0000 1.15.2.1
@@ -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
retrieving revision 1.23.2.1
diff -u -r1.23 -r1.23.2.1
--- updates.py 19 Jun 2006 03:13:48 -0000 1.23
+++ updates.py 5 Dec 2006 00:44:26 -0000 1.23.2.1
@@ -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.
- Previous message: [yum-cvs] yum/bin yum-updatesd.py,1.1,1.1.2.1 yum.py,1.7,1.7.4.1
- Next message: [yum-cvs] yum callback.py, 1.29, 1.29.2.1 cli.py, 1.241.2.4, 1.241.2.5 output.py, 1.72.2.1, 1.72.2.2 progress_meter.py, 1.3, 1.3.6.1 shell.py, 1.33.2.1, 1.33.2.2 yum-updatesd.py, 1.22.2.5, 1.22.2.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Yum-cvs-commits
mailing list