aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
diff options
context:
space:
mode:
authorJames Hilliard <james.hilliard1@gmail.com>2020-04-26 19:30:42 -0600
committerDylan Baker <dylan@pnwbakers.com>2020-04-30 13:06:56 -0700
commitd7c24ccddd13b4b36d63df1908cfa886f9fb7324 (patch)
tree27b100f4dc16a6f1e5bcb0497ba0e3e0455329b3 /mesonbuild/interpreter.py
parentcd566d2bd5f2f1faa3576b51b6b47c74a7ed0392 (diff)
downloadmeson-d7c24ccddd13b4b36d63df1908cfa886f9fb7324.zip
meson-d7c24ccddd13b4b36d63df1908cfa886f9fb7324.tar.gz
meson-d7c24ccddd13b4b36d63df1908cfa886f9fb7324.tar.bz2
Allow get_variable to still function when the fallback is a disabler.
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index dd1e57b..441f3c4 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -4661,6 +4661,8 @@ This will become a hard error in the future.''', location=self.current_node)
if len(args) < 1 or len(args) > 2:
raise InvalidCode('Get_variable takes one or two arguments.')
varname = args[0]
+ if isinstance(varname, Disabler):
+ return varname
if not isinstance(varname, str):
raise InterpreterException('First argument must be a string.')
try: