summaryrefslogtreecommitdiff
path: root/SCons/Node/Python.py
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2021-04-23 12:22:52 -0600
committerMats Wichmann <mats@linux.com>2021-04-23 12:22:52 -0600
commitf5c69f68871141018bd09f7ca499ff6724946173 (patch)
treedaee465da102ef4aa70cd07a56f54ff9c62bc1c1 /SCons/Node/Python.py
parentca884a6fda9ddc7f11affca8b8cc292e8026eba2 (diff)
downloadscons-git-f5c69f68871141018bd09f7ca499ff6724946173.tar.gz
Avoid exception if tool set to empty
When the reproducer in issue #1742 was run on git head, it failed in a different way than in the issue: an exception "list index out of range", caused by the test setting CC="" in the Environment call(). While this is a rather unuseful thing to do in general, the resulting call to env.WhereIs should not throw an exception because the general WhereIs function ends up indexing into something that can't be indexed. Avoid this by returning None immediately if the list of names to look for is empty. Note this does _not_ fix issue 1742, it just avoids the new problem it was failing on. Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'SCons/Node/Python.py')
0 files changed, 0 insertions, 0 deletions