diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2020-03-08 14:49:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-08 14:49:23 +0200 |
commit | 44ff3e6c7de0db188284cc834b304e7b0e960d00 (patch) | |
tree | da5c45cecc16083c5120a3977383b42bd9d4cbf2 /mesonbuild/mlog.py | |
parent | 91976a3489acbe53593e866fdb11951b515fda54 (diff) | |
parent | 06b1a317d26cbe2a1bd7a232dd9726590d0c0a48 (diff) | |
download | meson-44ff3e6c7de0db188284cc834b304e7b0e960d00.zip meson-44ff3e6c7de0db188284cc834b304e7b0e960d00.tar.gz meson-44ff3e6c7de0db188284cc834b304e7b0e960d00.tar.bz2 |
Merge pull request #6736 from dcbaker/mesonlib-type-annotations
Mesonlib type annotations
Diffstat (limited to 'mesonbuild/mlog.py')
-rw-r--r-- | mesonbuild/mlog.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/mlog.py b/mesonbuild/mlog.py index ea75bd0..88a47e7 100644 --- a/mesonbuild/mlog.py +++ b/mesonbuild/mlog.py @@ -298,7 +298,7 @@ def exception(e: Exception, prefix: T.Optional[AnsiDecorator] = None) -> None: prefix = red('ERROR:') log() args = [] # type: T.List[T.Union[AnsiDecorator, str]] - if hasattr(e, 'file') and hasattr(e, 'lineno') and hasattr(e, 'colno'): + if getattr(e, 'file') is not None and getattr(e, 'lineno') is not None and getattr(e, 'colno') is not None: # Mypy doesn't follow hasattr, and it's pretty easy to visually inspect # that this is correct, so we'll just ignore it. path = get_relative_path(Path(e.file), Path(os.getcwd())) # type: ignore |