aboutsummaryrefslogtreecommitdiff
path: root/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-09-17 20:07:40 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-09-17 20:07:40 +0300
commit5c5f8c781385d416748000dbdb6f74fa59382340 (patch)
tree7e2840d1befa52d6e5e95add4e68013ba7b12f46 /interpreter.py
parent067935ce76c03099abe83998c7c0cb80f64b92f1 (diff)
parent77d53c2266ec0d8cb4d2a0da9fae93f0eafb30c7 (diff)
downloadmeson-5c5f8c781385d416748000dbdb6f74fa59382340.zip
meson-5c5f8c781385d416748000dbdb6f74fa59382340.tar.gz
meson-5c5f8c781385d416748000dbdb6f74fa59382340.tar.bz2
Merged trunk changes.
Diffstat (limited to 'interpreter.py')
-rw-r--r--interpreter.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/interpreter.py b/interpreter.py
index 264fcf6..5da6d8b 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -1462,11 +1462,18 @@ class Interpreter():
self.add_target(name, tg.held_object)
return tg
- @stringArgs
@noKwargs
def func_run_target(self, node, args, kwargs):
if len(args) < 2:
raise InterpreterException('Incorrect number of arguments')
+ for i in args:
+ try:
+ i = i.held_object
+ except AttributeError:
+ pass
+ if not isinstance(i, (str, build.BuildTarget)):
+ mlog.debug('Wrong type:', str(i))
+ raise InterpreterException('Invalid argument to run_target.')
name = args[0]
command = args[1]
cmd_args = args[2:]