From: stevenknight Date: Sun, 12 Oct 2008 04:28:06 +0000 (+0000) Subject: Python 2.6 portability: add __{add,radd}__() methods to the CLVar X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8e92d08c482fc95930d71c79cb1b4a7466e00dc9;p=scons.git Python 2.6 portability: add __{add,radd}__() methods to the CLVar class used for testing. git-svn-id: http://scons.tigris.org/svn/scons/trunk@3678 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py index 568f14d1..62530baa 100644 --- a/src/engine/SCons/EnvironmentTests.py +++ b/src/engine/SCons/EnvironmentTests.py @@ -134,6 +134,10 @@ class CLVar(UserList.UserList): if type(seq) == type(''): seq = string.split(seq) UserList.UserList.__init__(self, seq) + def __add__(self, other): + return UserList.UserList.__add__(self, CLVar(other)) + def __radd__(self, other): + return UserList.UserList.__radd__(self, CLVar(other)) def __coerce__(self, other): return (self, CLVar(other))