diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2020-03-01 18:17:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-01 18:17:41 +0200 |
commit | 25cbcb19a9208ebf8f5cde3f8ecb91df0a2dfebf (patch) | |
tree | cf29f0c60ac4014b9395edbe2a9c3efdad449291 /mesonbuild/mesonlib.py | |
parent | 74452f2a1c842291c893504876507946103ac77f (diff) | |
parent | 96f661e15046a4222fd01a7216e18de901b73cb6 (diff) | |
download | meson-25cbcb19a9208ebf8f5cde3f8ecb91df0a2dfebf.zip meson-25cbcb19a9208ebf8f5cde3f8ecb91df0a2dfebf.tar.gz meson-25cbcb19a9208ebf8f5cde3f8ecb91df0a2dfebf.tar.bz2 |
Merge pull request #6627 from jon-turney/cwd-relative-file-locations
Consistently report file locations relative to cwd
Diffstat (limited to 'mesonbuild/mesonlib.py')
-rw-r--r-- | mesonbuild/mesonlib.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index e09d123..854c934 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -122,13 +122,6 @@ an_unpicklable_object = threading.Lock() class MesonException(Exception): '''Exceptions thrown by Meson''' - def get_msg_with_context(self): - s = '' - if hasattr(self, 'lineno') and hasattr(self, 'file'): - s = get_error_location_string(self.file, self.lineno) + ' ' - s += str(self) - return s - class EnvironmentException(MesonException): '''Exceptions thrown while processing and creating the build environment''' @@ -1339,16 +1332,6 @@ def detect_subprojects(spdir_name, current_dir='', result=None): result[basename] = [trial] return result -# This isn't strictly correct. What we really want here is something like: -# class StringProtocol(typing_extensions.Protocol): -# -# def __str__(self) -> str: ... -# -# This would more accurately embody what this funcitonc an handle, but we -# don't have that yet, so instead we'll do some casting to work around it -def get_error_location_string(fname: str, lineno: str) -> str: - return '{}:{}:'.format(fname, lineno) - def substring_is_in_list(substr: str, strlist: T.List[str]) -> bool: for s in strlist: if substr in s: |