diff options
author | Dirk Baechle <dl9obn@darc.de> | 2014-05-20 17:28:50 (GMT) |
---|---|---|
committer | Dirk Baechle <dl9obn@darc.de> | 2014-05-20 17:28:50 (GMT) |
commit | c36de026dc80becfe5abbfa617203b17ab3c0c7a (patch) | |
tree | 413c0e40e173b1f01a4d50423a8acc8cc8a55d79 /src/engine | |
parent | bebd12923cbb9632875c8a6367efb23a74f9c1f8 (diff) | |
download | SCons-c36de026dc80becfe5abbfa617203b17ab3c0c7a.zip SCons-c36de026dc80becfe5abbfa617203b17ab3c0c7a.tar.gz SCons-c36de026dc80becfe5abbfa617203b17ab3c0c7a.tar.bz2 |
- allow varlist to be specified as list of strings, fixes issue #2754
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/SCons/Action.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/ActionTests.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/engine/SCons/Action.py b/src/engine/SCons/Action.py index 16866b6..1c746be 100644 --- a/src/engine/SCons/Action.py +++ b/src/engine/SCons/Action.py @@ -337,7 +337,7 @@ def _do_create_keywords(args, kw): '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( diff --git a/src/engine/SCons/ActionTests.py b/src/engine/SCons/ActionTests.py index 809e5ce..b46347d 100644 --- a/src/engine/SCons/ActionTests.py +++ b/src/engine/SCons/ActionTests.py @@ -211,6 +211,9 @@ def test_varlist(pos_call, str_call, cmd, cmdstrfunc, **kw): 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 |