Python 2.6 portability: add __{add,radd}__() methods to the CLVar
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sun, 12 Oct 2008 04:28:06 +0000 (04:28 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sun, 12 Oct 2008 04:28:06 +0000 (04:28 +0000)
class used for testing.

git-svn-id: http://scons.tigris.org/svn/scons/trunk@3678 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/EnvironmentTests.py

index 568f14d1f35d5f2d999e0ad83e4524aaf0db51a4..62530baa2d00689de0ab16136666665da98f170b 100644 (file)
@@ -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))