From f23a4a8b27b2a2e46185869bb736b1ab843cdcf3 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Sun, 19 Feb 2017 03:53:21 +0530 Subject: run_command: Fix error message on incorrect argument Be more descriptive so people know what they can do. --- mesonbuild/interpreter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mesonbuild/interpreter.py') diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index d6cc921..f6065d5 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -1421,7 +1421,8 @@ class Interpreter(InterpreterBase): elif isinstance(cmd, str): cmd = [cmd] else: - raise InterpreterException('First argument is of incorrect type.') + raise InterpreterException('First argument should be find_program() ' + 'or string, not {!r}'.format(cmd)) expanded_args = [] for a in mesonlib.flatten(cargs): if isinstance(a, str): -- cgit v1.1