summaryrefslogtreecommitdiff
path: root/trunk/src/eclean
diff options
context:
space:
mode:
authorantarus <antarus@gentoo.org>2007-04-01 03:42:49 +0000
committerantarus <antarus@gentoo.org>2007-04-01 03:42:49 +0000
commitc94a5cdec8c810a23c7952db2ab6b3aa2958c904 (patch)
treeb2fc3ac1133f1aca9e0b7b0fc5e688e2f3e63e6c /trunk/src/eclean
parent3cb281b082bbd686ab66830ea87151e09a1c3622 (diff)
downloadgentoolkit-c94a5cdec8c810a23c7952db2ab6b3aa2958c904.tar.gz
remove deprecated string usage
svn path=/; revision=370
Diffstat (limited to 'trunk/src/eclean')
-rw-r--r--trunk/src/eclean/eclean6
1 files changed, 3 insertions, 3 deletions
diff --git a/trunk/src/eclean/eclean b/trunk/src/eclean/eclean
index 066b0d2..5c5f117 100644
--- a/trunk/src/eclean/eclean
+++ b/trunk/src/eclean/eclean
@@ -17,7 +17,7 @@ __description__ = "A cleaning tool for Gentoo distfiles and binaries."
# Python imports:
import sys
import os, stat
-import string, re
+import re
import time
import getopt
import fpformat
@@ -249,7 +249,7 @@ def parseSize(size):
mymatch = re.match(r"^(?P<value>\d+)(?P<unit>[GMKBgmkb])?$",size)
mysize = int(mymatch.group('value'))
if mymatch.group('unit'):
- mysize *= myunits[string.capitalize(mymatch.group('unit'))]
+ mysize *= myunits[mymatch.group('unit').capitalize()]
except:
raise ParseArgsException('size')
return mysize
@@ -271,7 +271,7 @@ def parseTime(timespec):
mymatch = re.match(r"^(?P<value>\d+)(?P<unit>[YMWDHymwdh])?$",timespec)
myvalue = int(mymatch.group('value'))
if not mymatch.group('unit'): myunit = 'D'
- else: myunit = string.capitalize(mymatch.group('unit'))
+ else: myunit = mymatch.group('unit').capitalize()
except: raise ParseArgsException('time')
# calculate the limit EPOCH date
mytime = time.time() - (myvalue * myunits[myunit])