Commits

dirkbaechle committed 4f4ccfb

- allow varlist to be specified as list of strings, fixes issue #2754

Comments (0)

Files changed (3)

 
   From Dirk Baechle:
     - Update XML doc editor configuration
+    - Fix: Allow varlist to be specified as list of strings for Actions (#2754)
 
   From Rob Managan:
     - Updated the TeX builder to support use of the -synctex=1

src/engine/SCons/Action.py

                 'You must either pass a string or a callback which '
                 'accepts (target, source, env) as parameters.')
         if len(args) > 1:
-            kw['varlist'] = args[1:] + kw['varlist']
+            kw['varlist'] = tuple(SCons.Util.flatten(args[1:])) + kw['varlist']
     if kw.get('strfunction', _null) is not _null \
                       and kw.get('cmdstr', _null) is not _null:
         raise SCons.Errors.UserError(

src/engine/SCons/ActionTests.py

     a = call_action((cmd, cmdstrfunc, 'a', 'b', 'c'))
     assert a.varlist == ('a', 'b', 'c'), a.varlist
 
+    a = call_action((cmd, cmdstrfunc, ['a', 'b', 'c']))
+    assert a.varlist == ('a', 'b', 'c'), a.varlist
+
     kw['varlist'] = 'foo'
     a = call_action((cmd, cmdstrfunc))
     assert a.varlist == ('foo',), a.varlist