aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-12-16 17:47:43 -0500
committerEli Schwartz <eschwartz@archlinux.org>2021-12-30 15:15:25 -0500
commitdb528e3bb9c986a28abf38ca5d28e32506d388e9 (patch)
tree56ae8054e74eb695d197d2649b73a843f18caccb
parent1708148f510975a3d1cdda53837439a5ee5a5fd2 (diff)
downloadmeson-db528e3bb9c986a28abf38ca5d28e32506d388e9.zip
meson-db528e3bb9c986a28abf38ca5d28e32506d388e9.tar.gz
meson-db528e3bb9c986a28abf38ca5d28e32506d388e9.tar.bz2
fix crash during MesonException
In commit e5a6283c4cf288fdfc9b43a92bf0ddd74dbf90f8, this function was reorganized to assign value -> newvalue instead of overwriting newvalue, but the error message case wasn't updated to match. As a result, actually hitting the error would report an even more errory error, i.e. a traceback. (Actually hitting the error requires passing an array option as a python object that isn't a list or a string. This is impossible to do from the command line or meson_options.txt, but can be done with builtin options.)
-rw-r--r--mesonbuild/coredata.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index f444cf1..6ac2151 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -234,7 +234,7 @@ class UserArrayOption(UserOption[T.List[str]]):
elif isinstance(value, list):
newvalue = value
else:
- raise MesonException(f'"{newvalue}" should be a string array, but it is not')
+ raise MesonException(f'"{value}" should be a string array, but it is not')
return newvalue
def validate_value(self, value: T.Union[str, T.List[str]], user_input: bool = True) -> T.List[str]: