diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2019-10-08 12:09:01 -0400 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.com> | 2019-10-08 12:11:56 -0400 |
commit | 9855b2d3c58800f485355229102212eaebf6645a (patch) | |
tree | 95f5e84d7e1d0d41eac62848dcc9efa9a974dc9d /mesonbuild | |
parent | 1930fc82e24a72625cd851903c22d893e4817a3c (diff) | |
download | meson-9855b2d3c58800f485355229102212eaebf6645a.zip meson-9855b2d3c58800f485355229102212eaebf6645a.tar.gz meson-9855b2d3c58800f485355229102212eaebf6645a.tar.bz2 |
Test disabler in foreach loops
The is_disabler() check in evaluate_foreach() was useless because we
already checked that items is a list.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/interpreterbase.py | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/mesonbuild/interpreterbase.py b/mesonbuild/interpreterbase.py index 5c83900..562ba27 100644 --- a/mesonbuild/interpreterbase.py +++ b/mesonbuild/interpreterbase.py @@ -682,8 +682,6 @@ The result of this is undefined and will become a hard error in a future Meson r if len(node.varnames) != 1: raise InvalidArguments('Foreach on array does not unpack') varname = node.varnames[0].value - if is_disabler(items): - return items for item in items: self.set_variable(varname, item) try: @@ -695,8 +693,6 @@ The result of this is undefined and will become a hard error in a future Meson r elif isinstance(items, dict): if len(node.varnames) != 2: raise InvalidArguments('Foreach on dict unpacks key and value') - if is_disabler(items): - return items for key, value in items.items(): self.set_variable(node.varnames[0].value, key) self.set_variable(node.varnames[1].value, value) |