From e7f626f250229b54c0fa08b828ee99076cb72535 Mon Sep 17 00:00:00 2001 From: Alec Warner Date: Fri, 12 Jan 2007 23:07:28 +0000 Subject: remove the last of the string module from portage.py svn path=/main/trunk/; revision=5620 --- pym/portage.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pym') 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") -- cgit v1.2.3-1-g7c22