aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mlog.py
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2018-04-22 08:05:13 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2018-04-26 00:01:48 +0300
commit10a9bdad9688943bb303efd74ceff2e7d9990d94 (patch)
tree967666c015548c6793c71377a5b395dd8d4481a6 /mesonbuild/mlog.py
parent0af029e08cc4fb6bec56bf2e1be3ea686a1174df (diff)
downloadmeson-10a9bdad9688943bb303efd74ceff2e7d9990d94.zip
meson-10a9bdad9688943bb303efd74ceff2e7d9990d94.tar.gz
meson-10a9bdad9688943bb303efd74ceff2e7d9990d94.tar.bz2
interpreter: Verify permitted kwargs on all methods
Diffstat (limited to 'mesonbuild/mlog.py')
-rw-r--r--mesonbuild/mlog.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/mesonbuild/mlog.py b/mesonbuild/mlog.py
index 6cbaf60..afefaa6 100644
--- a/mesonbuild/mlog.py
+++ b/mesonbuild/mlog.py
@@ -119,9 +119,8 @@ def _log_error(severity, *args, **kwargs):
else:
assert False, 'Invalid severity ' + severity
- if 'location' in kwargs:
- location = kwargs['location']
- del kwargs['location']
+ location = kwargs.pop('location', None)
+ if location is not None:
location_str = '{}:{}:'.format(os.path.join(location.subdir,
environment.build_filename),
location.lineno)