aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreterbase.py
diff options
context:
space:
mode:
authorJames Hilliard <james.hilliard1@gmail.com>2019-10-24 20:20:53 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2019-10-24 23:57:31 +0300
commit2b6c997e33e0864fd9bd462e913323b6711f644a (patch)
treef87620ea94245f2bf2687c15b0debd33fd2967c9 /mesonbuild/interpreterbase.py
parent9ee9a1e1b25784c2d1ac93cae319dfbed43a67fc (diff)
downloadmeson-2b6c997e33e0864fd9bd462e913323b6711f644a.zip
meson-2b6c997e33e0864fd9bd462e913323b6711f644a.tar.gz
meson-2b6c997e33e0864fd9bd462e913323b6711f644a.tar.bz2
Return a disabler when an unknown method is called on a disabler object
Diffstat (limited to 'mesonbuild/interpreterbase.py')
-rw-r--r--mesonbuild/interpreterbase.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/interpreterbase.py b/mesonbuild/interpreterbase.py
index 3e09310..abb4696 100644
--- a/mesonbuild/interpreterbase.py
+++ b/mesonbuild/interpreterbase.py
@@ -803,8 +803,11 @@ The result of this is undefined and will become a hard error in a future Meson r
(args, kwargs) = self.reduce_arguments(args)
# Special case. This is the only thing you can do with a disabler
# object. Every other use immediately returns the disabler object.
- if isinstance(obj, Disabler) and method_name == 'found':
- return False
+ if isinstance(obj, Disabler):
+ if method_name == 'found':
+ return False
+ else:
+ return Disabler()
if is_disabled(args, kwargs):
return Disabler()
if method_name == 'extract_objects':