summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2007-01-12 23:07:28 +0000
committerAlec Warner <antarus@gentoo.org>2007-01-12 23:07:28 +0000
commite7f626f250229b54c0fa08b828ee99076cb72535 (patch)
treeee2fa4b0507a9417c36cd9f569ca61966c8b9b05
parent432ceeacbfbda13edae2e258423c24973f57d87f (diff)
downloadportage-e7f626f250229b54c0fa08b828ee99076cb72535.tar.gz
portage-e7f626f250229b54c0fa08b828ee99076cb72535.tar.bz2
portage-e7f626f250229b54c0fa08b828ee99076cb72535.zip
remove the last of the string module from portage.py
svn path=/main/trunk/; revision=5620
-rw-r--r--pym/portage.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 55e847887..bcbb376f1 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -17,7 +17,7 @@ except ImportError:
raise
try:
- import copy, errno, os, re, shutil, string, time, types
+ import copy, errno, os, re, shutil, time, types
try:
import cPickle
except ImportError:
@@ -789,7 +789,7 @@ def ExtractKernelVersion(base_dir):
except IOError, details:
return (None, str(details))
- lines = map(string.strip, lines)
+ lines = [l.strip() for l in lines]
version = ''
@@ -797,7 +797,7 @@ def ExtractKernelVersion(base_dir):
for line in lines:
# split on the '=' then remove annoying whitespace
items = line.split("=")
- items = map(string.strip, items)
+ items = [i.strip() for i in items]
if items[0] == 'VERSION' or \
items[0] == 'PATCHLEVEL':
version += items[1]
@@ -817,7 +817,7 @@ def ExtractKernelVersion(base_dir):
# Append the contents of each to the version string, stripping ALL whitespace
for lv in localversions:
- version += string.join(string.split(string.join(grabfile(base_dir+"/"+lv))), "")
+ version += "".join( " ".join( grabfile( base_dir+ "/" + lv ) ).split() )
# Check the .config for a CONFIG_LOCALVERSION and append that too, also stripping whitespace
kernelconfig = getconfig(base_dir+"/.config")