summaryrefslogtreecommitdiffstats
path: root/test/Scanner/Python/script.py
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2021-04-23 18:22:52 (GMT)
committerMats Wichmann <mats@linux.com>2021-04-23 18:22:52 (GMT)
commitf5c69f68871141018bd09f7ca499ff6724946173 (patch)
treedaee465da102ef4aa70cd07a56f54ff9c62bc1c1 /test/Scanner/Python/script.py
parentca884a6fda9ddc7f11affca8b8cc292e8026eba2 (diff)
downloadSCons-f5c69f68871141018bd09f7ca499ff6724946173.zip
SCons-f5c69f68871141018bd09f7ca499ff6724946173.tar.gz
SCons-f5c69f68871141018bd09f7ca499ff6724946173.tar.bz2
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 'test/Scanner/Python/script.py')
0 files changed, 0 insertions, 0 deletions