From f079f8226f16b13d92ea725bca8556cb9a7cf785 Mon Sep 17 00:00:00 2001 From: stevenknight Date: Sat, 23 Oct 2004 17:50:16 +0000 Subject: [PATCH] Fix ExecutorTests under Python 2.x, where str() throws a TypeError if the returned value is not a string. git-svn-id: http://scons.tigris.org/svn/scons/trunk@1139 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/engine/SCons/Executor.py | 2 +- src/engine/SCons/ExecutorTests.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/SCons/Executor.py b/src/engine/SCons/Executor.py index 6767cc87..68af6ed6 100644 --- a/src/engine/SCons/Executor.py +++ b/src/engine/SCons/Executor.py @@ -164,7 +164,7 @@ class Executor: def nullify(self): self.__call__ = self.do_nothing - self.string = None + self.string = '' self._strfunc = None def get_raw_contents(self): diff --git a/src/engine/SCons/ExecutorTests.py b/src/engine/SCons/ExecutorTests.py index d52853c9..dc98818d 100644 --- a/src/engine/SCons/ExecutorTests.py +++ b/src/engine/SCons/ExecutorTests.py @@ -237,7 +237,7 @@ class ExecutorTestCase(unittest.TestCase): x(MyNode([], []), None) assert result == [], result s = str(x) - assert s == None, s + assert s == '', s s = x.strfunction() assert s == None, s -- 2.26.2