[yum-cvs] yum/rpmUtils miscutils.py,1.15,1.16 updates.py,1.23,1.24
James Bowes
jbowes at linux.duke.edu
Tue Dec 5 00:40:53 UTC 2006
- Previous message: [yum-cvs] yum callback.py, 1.29, 1.30 cli.py, 1.245, 1.246 output.py, 1.73, 1.74 progress_meter.py, 1.3, 1.4 shell.py, 1.34, 1.35 yum-updatesd.py, 1.28, 1.29
- Next message: [yum-cvs] yum/yum comps.py, 1.11, 1.12 depsolve.py, 1.106, 1.107 failover.py, 1.2, 1.3 mdparser.py, 1.5, 1.6 misc.py, 1.22, 1.23 packageSack.py, 1.21, 1.22 packages.py, 1.80, 1.81 pgpmsg.py, 1.5, 1.6 sqlitecache.py, 1.13, 1.14 update_md.py, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/groups/yum/cvs/yum/rpmUtils
In directory login1.linux.duke.edu:/tmp/cvs-serv662/rpmUtils
Modified Files:
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.16
diff -u -r1.15 -r1.16
--- miscutils.py 6 Sep 2006 04:45:22 -0000 1.15
+++ miscutils.py 5 Dec 2006 00:40:51 -0000 1.16
@@ -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.24
diff -u -r1.23 -r1.24
--- updates.py 19 Jun 2006 03:13:48 -0000 1.23
+++ updates.py 5 Dec 2006 00:40:51 -0000 1.24
@@ -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 callback.py, 1.29, 1.30 cli.py, 1.245, 1.246 output.py, 1.73, 1.74 progress_meter.py, 1.3, 1.4 shell.py, 1.34, 1.35 yum-updatesd.py, 1.28, 1.29
- Next message: [yum-cvs] yum/yum comps.py, 1.11, 1.12 depsolve.py, 1.106, 1.107 failover.py, 1.2, 1.3 mdparser.py, 1.5, 1.6 misc.py, 1.22, 1.23 packageSack.py, 1.21, 1.22 packages.py, 1.80, 1.81 pgpmsg.py, 1.5, 1.6 sqlitecache.py, 1.13, 1.14 update_md.py, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Yum-cvs-commits
mailing list