From bf98ffca9ee67a6a942b9abf96b536692370cf03 Mon Sep 17 00:00:00 2001 From: Daniel Mensinger Date: Tue, 23 Apr 2019 14:55:02 +0200 Subject: Fix blind exceptions --- mesonbuild/ast/introspection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/ast/introspection.py') diff --git a/mesonbuild/ast/introspection.py b/mesonbuild/ast/introspection.py index 49d531f..34e3e09 100644 --- a/mesonbuild/ast/introspection.py +++ b/mesonbuild/ast/introspection.py @@ -122,7 +122,7 @@ class IntrospectionInterpreter(AstInterpreter): subi.analyze() subi.project_data['name'] = dirname self.project_data['subprojects'] += [subi.project_data] - except: + except (mesonlib.MesonException, RuntimeError): return def func_add_languages(self, node, args, kwargs): -- cgit v1.1 From e75211d321d7416b8a4871d3015a7915fb86b53b Mon Sep 17 00:00:00 2001 From: Daniel Mensinger Date: Tue, 23 Apr 2019 14:58:18 +0200 Subject: Fix builtin variable names --- mesonbuild/ast/introspection.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mesonbuild/ast/introspection.py') diff --git a/mesonbuild/ast/introspection.py b/mesonbuild/ast/introspection.py index 34e3e09..b6ec450 100644 --- a/mesonbuild/ast/introspection.py +++ b/mesonbuild/ast/introspection.py @@ -173,9 +173,9 @@ class IntrospectionInterpreter(AstInterpreter): arg_node = curr.args elif isinstance(curr, IdNode): # Try to resolve the ID and append the node to the queue - id = curr.value - if id in self.assignments and self.assignments[id]: - tmp_node = self.assignments[id][0] + var_name = curr.value + if var_name in self.assignments and self.assignments[var_name]: + tmp_node = self.assignments[var_name][0] if isinstance(tmp_node, (ArrayNode, IdNode, FunctionNode)): srcqueue += [tmp_node] elif isinstance(curr, ArithmeticNode): -- cgit v1.1