From 9cebd29da973553c6e657f7b318ab1d6afbc76e6 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 21 Jan 2021 11:53:09 -0800 Subject: [PATCH] mesonlib: Add better errormessage to typelistify --- ci/ciimage/ubuntu-rolling/install.sh | 2 +- mesonbuild/mesonlib/universal.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/ciimage/ubuntu-rolling/install.sh b/ci/ciimage/ubuntu-rolling/install.sh index 9a4c97675..da31766a2 100755 --- a/ci/ciimage/ubuntu-rolling/install.sh +++ b/ci/ciimage/ubuntu-rolling/install.sh @@ -27,7 +27,7 @@ pkgs=( libblocksruntime-dev libperl-dev liblapack-dev libscalapack-mpi-dev - rust-bindgen + bindgen ) sed -i '/^#\sdeb-src /s/^#//' "/etc/apt/sources.list" diff --git a/mesonbuild/mesonlib/universal.py b/mesonbuild/mesonlib/universal.py index 4b913a833..7deb24a11 100644 --- a/mesonbuild/mesonlib/universal.py +++ b/mesonbuild/mesonlib/universal.py @@ -1262,10 +1262,10 @@ def typeslistify(item: 'T.Union[_T, T.Sequence[_T]]', if isinstance(item, types): item = T.cast(T.List[_T], [item]) if not isinstance(item, list): - raise MesonException('Item must be a list or one of {!r}'.format(types)) + raise MesonException('Item must be a list or one of {!r}, not {!r}'.format(types, type(item))) for i in item: if i is not None and not isinstance(i, types): - raise MesonException('List item must be one of {!r}'.format(types)) + raise MesonException('List item must be one of {!r}, not {!r}'.format(types, type(i))) return item