From 7bb28ef3c87f4f19daf83f4f564d9e3338eff10a Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Fri, 2 Oct 2015 22:06:26 +0300 Subject: Flatten method arguments so you can generate an array of items. --- interpreter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'interpreter.py') diff --git a/interpreter.py b/interpreter.py index b6e98dd..edfe59b 100644 --- a/interpreter.py +++ b/interpreter.py @@ -39,8 +39,10 @@ class InvalidArguments(InterpreterException): def check_stringlist(a, msg='Arguments must be strings.'): if not isinstance(a, list): + mlog.debug('Not a list:', str(a)) raise InvalidArguments('Argument not a list.') if not all(isinstance(s, str) for s in a): + mlog.debug('Element not a string:', str(a)) raise InvalidArguments(msg) def noPosargs(f): @@ -1857,7 +1859,7 @@ class Interpreter(): (args, kwargs) = self.reduce_arguments(args) if method_name == 'extract_objects': self.validate_extraction(obj.held_object) - return obj.method_call(method_name, args, kwargs) + return obj.method_call(method_name, self.flatten(args), kwargs) # Only permit object extraction from the same subproject def validate_extraction(self, buildtarget): -- cgit v1.1