Fix non-list used with FeatureNewKwargs

The type of this argument needs checking, or single strings need handling correctly.
pull/3699/head
Jon Turney 7 years ago committed by Nirbheek Chauhan
parent 48d49afe31
commit f31679dedd
  1. 2
      mesonbuild/build.py
  2. 2
      mesonbuild/interpreter.py

@ -1091,7 +1091,7 @@ recommended as it can lead to undefined behaviour on some platforms''')
return return
class Generator: class Generator:
@FeatureNewKwargs('generator', '0.43.0', 'capture') @FeatureNewKwargs('generator', '0.43.0', ['capture'])
def __init__(self, args, kwargs): def __init__(self, args, kwargs):
if len(args) != 1: if len(args) != 1:
raise InvalidArguments('Generator requires exactly one positional argument: the executable') raise InvalidArguments('Generator requires exactly one positional argument: the executable')

@ -2832,7 +2832,7 @@ root and issuing %s.
mlog.bold(subproj_path), 'found:', mlog.green('YES')) mlog.bold(subproj_path), 'found:', mlog.green('YES'))
return dep return dep
@FeatureNewKwargs('executable', '0.42.0', 'implib') @FeatureNewKwargs('executable', '0.42.0', ['implib'])
@permittedKwargs(permitted_kwargs['executable']) @permittedKwargs(permitted_kwargs['executable'])
def func_executable(self, node, args, kwargs): def func_executable(self, node, args, kwargs):
return self.build_target(node, args, kwargs, ExecutableHolder) return self.build_target(node, args, kwargs, ExecutableHolder)

Loading…
Cancel
Save