interpreter: Allow FileMode to be passed to _get_kwarg_install_mode

This will happen as we transition from doing the conversion in the
function body to using the KwargInfo to make that change. If we get one
just return it.
pull/9329/head
Dylan Baker 3 years ago committed by Daniel Mensinger
parent 3bb6d56dcd
commit 74819dbd2a
  1. 2
      mesonbuild/interpreter/interpreter.py

@ -1898,6 +1898,8 @@ This will become a hard error in the future.''' % kwargs['input'], location=self
def _get_kwarg_install_mode(self, kwargs: T.Dict[str, T.Any]) -> T.Optional[FileMode]:
if kwargs.get('install_mode', None) is None:
return None
if isinstance(kwargs['install_mode'], FileMode):
return kwargs['install_mode']
install_mode: T.List[str] = []
mode = mesonlib.typeslistify(kwargs.get('install_mode', []), (str, int))
for m in mode:

Loading…
Cancel
Save