aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mparser.py
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2017-12-30 18:31:18 +0000
committerJon Turney <jon.turney@dronecode.org.uk>2017-12-30 19:32:54 +0000
commit3c75ae9ced4c45dded69e8d56478a848a5abfedb (patch)
treea4ed373a9ac6afa7761e35155026272340ec4602 /mesonbuild/mparser.py
parent2c1b45b2b22b8609f08265db2446323cd0a27fc0 (diff)
downloadmeson-3c75ae9ced4c45dded69e8d56478a848a5abfedb.zip
meson-3c75ae9ced4c45dded69e8d56478a848a5abfedb.tar.gz
meson-3c75ae9ced4c45dded69e8d56478a848a5abfedb.tar.bz2
Add filename and lineno to duplicate kwargs warning
Fixes #1626 Also fix 'a an error' typo
Diffstat (limited to 'mesonbuild/mparser.py')
-rw-r--r--mesonbuild/mparser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/mparser.py b/mesonbuild/mparser.py
index 0465d24..782b7a7 100644
--- a/mesonbuild/mparser.py
+++ b/mesonbuild/mparser.py
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import re
+import os, re
from .mesonlib import MesonException
from . import mlog
@@ -368,7 +368,7 @@ class ArgumentNode:
def set_kwarg(self, name, value):
if name in self.kwargs:
- mlog.warning('Keyword argument "%s" defined multiple times. This will be a an error in future Meson releases.' % name)
+ mlog.warning('Keyword argument "%s" defined multiple times in file %s, line %d. This will be an error in future Meson releases.' % (name, os.path.join(self.subdir, 'meson.build'), self.lineno))
self.kwargs[name] = value
def num_args(self):