aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantarus <antarus@gentoo.org>2007-04-01 04:50:56 +0000
committerantarus <antarus@gentoo.org>2007-04-01 04:50:56 +0000
commit3bc929f25c4e992ddfd8cf3769df6330ed07fbdb (patch)
treea069bce557ea57f48f9f79741337f13084c39f98
parentremove deprecated string module usage, apparently string was never imported s... (diff)
downloadgentoolkit-3bc929f25c4e992ddfd8cf3769df6330ed07fbdb.tar.gz
gentoolkit-3bc929f25c4e992ddfd8cf3769df6330ed07fbdb.tar.bz2
gentoolkit-3bc929f25c4e992ddfd8cf3769df6330ed07fbdb.zip
remove string usage as it's obsolete
svn path=/; revision=376
-rw-r--r--trunk/src/old-scripts/pkg-clean7
1 files changed, 3 insertions, 4 deletions
diff --git a/trunk/src/old-scripts/pkg-clean b/trunk/src/old-scripts/pkg-clean
index a9d9709..9b07337 100644
--- a/trunk/src/old-scripts/pkg-clean
+++ b/trunk/src/old-scripts/pkg-clean
@@ -8,7 +8,6 @@
import commands
import re
import sys
-import string
import time
import os
from output import *
@@ -33,7 +32,7 @@ pkg_file_list = pkg_files.splitlines()
pkg_hash = {}
for time_pkg_pair in pkg_file_list:
(pkg_time, pkg) = time_pkg_pair.split()
- pkg_time = string.atoi(pkg_time)
+ pkg_time = int(pkg_time)
# This covers developer trees with not-accepted categories
tmp_name = re.match(r'/var/db/pkg/(.*/.*)/.*', pkg)
if not tmp_name: continue
@@ -84,12 +83,12 @@ for pkg_core in pkg_hash.keys():
ins = open(tmpname)
for j in ins.readlines():
- idx = string.atoi(j)
+ idx = int(j)
if idx == 0:
break
full_path = pkg_hash[pkg_core][idx-1][PKG]
- ebuild = string.replace(full_path, "/var/db/pkg/", "")
+ ebuild = full_path.replace('/var/db/pkg','')
if not assume_yes:
params = "dialog --backtitle \"" + ebuild + "\" " + \