From 21a203cfb79726d6798ca878e52b8ab39ef9b15a Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Fri, 29 Jun 2012 01:23:28 +0200 Subject: Use str.join() instead of string.join() for compatibility with Python 3. Signed-off-by: Anthony G. Basile --- WebappConfig/sandbox.py | 4 ++-- WebappConfig/wrapper.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'WebappConfig') diff --git a/WebappConfig/sandbox.py b/WebappConfig/sandbox.py index 698a566..bb92c50 100644 --- a/WebappConfig/sandbox.py +++ b/WebappConfig/sandbox.py @@ -24,7 +24,7 @@ __version__ = "$Id: permissions.py 129 2005-11-06 12:46:31Z wrobel $" # Dependencies # ------------------------------------------------------------------------ -import os, os.path, string, sys +import os, os.path, sys # stolen from portage if os.path.isdir("/proc/%i/fd" % os.getpid()): @@ -55,7 +55,7 @@ class Sandbox: def get_write(self): '''Return write paths.''' - return string.join ( map ( self.get_config, self.__write ), ':' ) \ + return ':'.join ( map ( self.get_config, self.__write ) ) \ + self.__syswrite def get_config(self, option): diff --git a/WebappConfig/wrapper.py b/WebappConfig/wrapper.py index fd4b010..1897dd6 100644 --- a/WebappConfig/wrapper.py +++ b/WebappConfig/wrapper.py @@ -26,7 +26,7 @@ __version__ = "$Id: wrapper.py 283 2006-04-20 22:53:04Z wrobel $" # Dependencies # ------------------------------------------------------------------------ -import os, string +import os from WebappConfig.debug import OUT @@ -62,7 +62,7 @@ def config_protect(cat, pn, pvr, pm): fo.close() fe.close() - return string.join(result_lines, ' ').strip() + return ' '.join(result_lines).strip() else: OUT.die("Unknown package manager: " + pm) @@ -156,7 +156,7 @@ def package_installed(full_name, pm): for i in error_lines: OUT.warn(i) - return string.join(result_lines, ' ') + return ' '.join(result_lines) else: OUT.die("Unknown package manager: " + pm) -- cgit v1.2.3-65-gdbad