From 1a82880730e2d9f58eaa67179aa40c6976835278 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 2 Mar 2020 11:11:10 -0800 Subject: mesonbuild/mesonlib: Add type annotations --- mesonbuild/interpreterbase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/interpreterbase.py') diff --git a/mesonbuild/interpreterbase.py b/mesonbuild/interpreterbase.py index 8071136..b8008b0 100644 --- a/mesonbuild/interpreterbase.py +++ b/mesonbuild/interpreterbase.py @@ -446,7 +446,7 @@ class InterpreterBase: self.current_lineno = cur.lineno self.evaluate_statement(cur) except Exception as e: - if not hasattr(e, 'lineno'): + if getattr(e, 'lineno') is None: # We are doing the equivalent to setattr here and mypy does not like it e.lineno = cur.lineno # type: ignore e.colno = cur.colno # type: ignore -- cgit v1.1