diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2020-11-13 11:15:46 +0200 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2020-11-13 06:17:13 -0500 |
commit | d4cd0ceb9d4efcd0f376db3e10405a7160fd5c41 (patch) | |
tree | 86732f9bedb7d3fc0901cef675845ae28092f8a4 | |
parent | 8992729adee7b6ad775513f1f93e638ebb1e1891 (diff) | |
download | meson-d4cd0ceb9d4efcd0f376db3e10405a7160fd5c41.zip meson-d4cd0ceb9d4efcd0f376db3e10405a7160fd5c41.tar.gz meson-d4cd0ceb9d4efcd0f376db3e10405a7160fd5c41.tar.bz2 |
The version kwarg must be a string. Closes #7975.
-rw-r--r-- | mesonbuild/interpreter.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 104fcce..83df514 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -3175,6 +3175,8 @@ external dependencies (including libraries) must go to "dependencies".''') self.build.project_name = proj_name self.active_projectname = proj_name self.project_version = kwargs.get('version', 'undefined') + if not isinstance(self.project_version, str): + raise InvalidCode('The version keyword argument must be a string.') if self.build.project_version is None: self.build.project_version = self.project_version proj_license = mesonlib.stringlistify(kwargs.get('license', 'unknown')) |