aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mlog.py
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2020-02-20 18:50:24 +0000
committerJon Turney <jon.turney@dronecode.org.uk>2020-02-28 11:54:08 +0000
commitc8f8d58273a40d94c820dccab54a7ae2d948cb8a (patch)
treeefa0c738fd4a0e6fc921194e857914a620cd0cbd /mesonbuild/mlog.py
parent585bf2b86726373f58224f005bfb5ec6f07c2a46 (diff)
downloadmeson-c8f8d58273a40d94c820dccab54a7ae2d948cb8a.zip
meson-c8f8d58273a40d94c820dccab54a7ae2d948cb8a.tar.gz
meson-c8f8d58273a40d94c820dccab54a7ae2d948cb8a.tar.bz2
Rename 'subdir' -> 'filename' in location objects
Diffstat (limited to 'mesonbuild/mlog.py')
-rw-r--r--mesonbuild/mlog.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/mesonbuild/mlog.py b/mesonbuild/mlog.py
index 3f33240..440ce8b 100644
--- a/mesonbuild/mlog.py
+++ b/mesonbuild/mlog.py
@@ -233,7 +233,6 @@ def get_error_location_string(fname: str, lineno: str) -> str:
def _log_error(severity: str, *rargs: T.Union[str, AnsiDecorator],
once: bool = False, **kwargs: T.Any) -> None:
- from .environment import build_filename
from .mesonlib import MesonException, relpath
# The typing requirements here are non-obvious. Lists are invariant,
@@ -251,7 +250,7 @@ def _log_error(severity: str, *rargs: T.Union[str, AnsiDecorator],
location = kwargs.pop('location', None)
if location is not None:
- location_file = relpath(location.subdir, os.getcwd())
+ location_file = relpath(location.filename, os.getcwd())
location_str = get_error_location_string(location_file, location.lineno)
# Unions are frankly awful, and we have to T.cast here to get mypy
# to understand that the list concatenation is safe