interpreter: Handle 'bool, str, int' values returned by modules

pull/4016/head
Thibault Saunier 6 years ago
parent 6ecd31af19
commit a95763c715
  1. 4
      mesonbuild/interpreter.py

@ -1974,7 +1974,7 @@ class Interpreter(InterpreterBase):
return [self.holderify(x) for x in item]
if isinstance(item, build.CustomTarget):
return CustomTargetHolder(item, self)
elif isinstance(item, (int, str)) or item is None:
elif isinstance(item, (int, str, bool)) or item is None:
return item
elif isinstance(item, build.Executable):
return ExecutableHolder(item, self)
@ -2018,6 +2018,8 @@ class Interpreter(InterpreterBase):
self.process_new_values(v.sources[0])
elif hasattr(v, 'held_object'):
pass
elif isinstance(v, (int, str, bool)):
pass
else:
raise InterpreterException('Module returned a value of unknown type.')

Loading…
Cancel
Save