Add filename and lineno to duplicate kwargs warning

Fixes #1626

Also fix 'a an error' typo
pull/2852/head
Jon Turney 7 years ago
parent 2c1b45b2b2
commit 3c75ae9ced
  1. 4
      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):

Loading…
Cancel
Save