aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-05-18 19:44:57 +0300
committerGitHub <noreply@github.com>2017-05-18 19:44:57 +0300
commit5ec6151e56140a19ef185052ffb02bd1ff957bd7 (patch)
tree53346478d8e84aefd170ac6226938ca89d6d0a77 /mesonbuild/interpreter.py
parenta31bc4ede5883d449c15c90535b21bc8f9e28d6d (diff)
parent0e56ec2dbdbbd463d608c42e0aa117357e18936a (diff)
downloadmeson-5ec6151e56140a19ef185052ffb02bd1ff957bd7.zip
meson-5ec6151e56140a19ef185052ffb02bd1ff957bd7.tar.gz
meson-5ec6151e56140a19ef185052ffb02bd1ff957bd7.tar.bz2
Merge pull request #1810 from QuLogic/pycharm-warnings
Fix various warnings found in PyCharm
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 5df26cc..948a6d4 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -100,7 +100,7 @@ class RunProcess(InterpreterObject):
try:
return Popen_safe(command_array, env=child_env, cwd=cwd)
except FileNotFoundError:
- raise InterpreterException('Could not execute command "%s".' % cmd_name)
+ raise InterpreterException('Could not execute command "%s".' % ' '.join(command_array))
def returncode_method(self, args, kwargs):
return self.returncode
@@ -573,6 +573,7 @@ class CustomTargetHolder(TargetHolder):
class RunTargetHolder(InterpreterObject):
def __init__(self, name, command, args, dependencies, subdir):
+ super().__init__()
self.held_object = build.RunTarget(name, command, args, dependencies, subdir)
def __repr__(self):
@@ -1353,7 +1354,6 @@ class Interpreter(InterpreterBase):
def module_method_callback(self, return_object):
if not isinstance(return_object, ModuleReturnValue):
- assert False
raise InterpreterException('Bug in module, it returned an invalid object')
invalues = return_object.new_objects
self.process_new_values(invalues)
@@ -2625,11 +2625,10 @@ different subdirectory.
raise InterpreterException('Tried to add non-existing source file %s.' % s)
def format_string(self, templ, args):
- templ = self.to_native(templ)
if isinstance(args, mparser.ArgumentNode):
args = args.arguments
for (i, arg) in enumerate(args):
- arg = self.to_native(self.evaluate_statement(arg))
+ arg = self.evaluate_statement(arg)
if isinstance(arg, bool): # Python boolean is upper case.
arg = str(arg).lower()
templ = templ.replace('@{}@'.format(i), str(arg))