From c94a5cdec8c810a23c7952db2ab6b3aa2958c904 Mon Sep 17 00:00:00 2001 From: antarus Date: Sun, 1 Apr 2007 03:42:49 +0000 Subject: [PATCH] remove deprecated string usage svn path=/; revision=370 --- trunk/src/eclean/eclean | 6 +++--- 1 file 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\d+)(?P[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\d+)(?P[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]) -- 2.26.2