Fix regression failure (shadowed variable) in Python 2.1
authorGregNoel <GregNoel@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 22 Apr 2009 21:59:19 +0000 (21:59 +0000)
committerGregNoel <GregNoel@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 22 Apr 2009 21:59:19 +0000 (21:59 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@4121 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/Tool/textfile.py

index 8fa2180860f8e1e68f42660702587d86b28273cf..586b182b50e96a90b6575937ca9f12aea9701921 100644 (file)
@@ -117,17 +117,17 @@ def _action(target, source, env):
 def _strfunc(target, source, env):
     return "Creating '%s'" % target[0]
 
+def _convert_list_R(newlist, sources):
+    for elem in sources:
+        if is_Sequence(elem):
+            _convert_list_R(newlist, elem)
+        elif isinstance(elem, Node):
+            newlist.append(elem)
+        else:
+            newlist.append(Value(elem))
 def _convert_list(target, source, env):
     if len(target) != 1:
         raise SCons.Errors.UserError("Only one target file allowed")
-    def _convert_list_R(newlist, sources):
-        for elem in sources:
-            if is_List(elem):
-                _convert_list_R(newlist, elem)
-            elif isinstance(elem, Node):
-                newlist.append(elem)
-            else:
-                newlist.append(Value(elem))
     newlist = []
     _convert_list_R(newlist, source)
     return target, newlist
@@ -164,3 +164,9 @@ def generate(env):
 
 def exists(env):
     return 1
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4: