summaryrefslogtreecommitdiffstats
path: root/SCons/Subst.py
diff options
context:
space:
mode:
authorDaniel Moody <dmoody256@gmail.com>2020-05-17 19:41:12 (GMT)
committerDaniel Moody <dmoody256@gmail.com>2020-05-17 19:41:12 (GMT)
commitcffd40b44080dcce1d238d037e026051eaa7a60b (patch)
tree31af770366e85ada4ab88ce62b4c5478480cca1e /SCons/Subst.py
parent52773da0faddc808056ffec34ed0112e2b42b5f7 (diff)
downloadSCons-cffd40b44080dcce1d238d037e026051eaa7a60b.zip
SCons-cffd40b44080dcce1d238d037e026051eaa7a60b.tar.gz
SCons-cffd40b44080dcce1d238d037e026051eaa7a60b.tar.bz2
cover other type of subber and add test
Diffstat (limited to 'SCons/Subst.py')
-rw-r--r--SCons/Subst.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/SCons/Subst.py b/SCons/Subst.py
index 29698d5..fbb89b3 100644
--- a/SCons/Subst.py
+++ b/SCons/Subst.py
@@ -591,12 +591,13 @@ class ListSubber(collections.UserList):
self.substitute(a, lvars, 1)
self.next_word()
elif callable(s):
- try:
+ if (s and
+ set(signature(s).parameters.keys()) == set(['target', 'source', 'env', 'for_signature'])):
s = s(target=lvars['TARGETS'],
source=lvars['SOURCES'],
env=self.env,
for_signature=(self.mode != SUBST_CMD))
- except TypeError:
+ else:
# This probably indicates that it's a callable
# object that doesn't match our calling arguments
# (like an Action).