diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2022-07-18 17:06:45 +0200 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-08-04 15:23:36 -0400 |
commit | 7c320e60f1afcb9c0ea7ec68e29842266c775a43 (patch) | |
tree | 05b2b16f7565826f616e38c5bbf7e86cb4c8ae6b /mesonbuild | |
parent | 748251fba6be36f07e060a5a6788eaa076d46f93 (diff) | |
download | meson-7c320e60f1afcb9c0ea7ec68e29842266c775a43.zip meson-7c320e60f1afcb9c0ea7ec68e29842266c775a43.tar.gz meson-7c320e60f1afcb9c0ea7ec68e29842266c775a43.tar.bz2 |
cmake: Change assertion into a more useful error (fixes #9925)
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/envconfig.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py index 820bc99..0e47c05 100644 --- a/mesonbuild/envconfig.py +++ b/mesonbuild/envconfig.py @@ -439,7 +439,8 @@ class CMakeVariables: for key, value in variables.items(): value = mesonlib.listify(value) for i in value: - assert isinstance(i, str) + if not isinstance(i, str): + raise EnvironmentException(f"Value '{i}' of CMake variable '{key}' defined in a machine file is a {type(i).__name__} and not a str") self.variables[key] = value def get_variables(self) -> T.Dict[str, T.List[str]]: |