diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2022-01-27 12:30:42 -0800 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-01-27 17:22:41 -0500 |
commit | 5d31735c1e5e2cfac581ebaf82442b1449aa18b8 (patch) | |
tree | ba394153b509d7187fe39e681c1806f5e8141156 /mesonbuild/modules/gnome.py | |
parent | fa4f96427a02b3b52499c3f38a6982d0230c147b (diff) | |
download | meson-5d31735c1e5e2cfac581ebaf82442b1449aa18b8.zip meson-5d31735c1e5e2cfac581ebaf82442b1449aa18b8.tar.gz meson-5d31735c1e5e2cfac581ebaf82442b1449aa18b8.tar.bz2 |
modules/gnome: Allow gdbus_annotations to take an empty list again
This was allows up to 0.61.0 (including with the initial type
annotations), but was accidentally broken by fixes for other bugs in
0.61.1.
Fixes: #9883
Diffstat (limited to 'mesonbuild/modules/gnome.py')
-rw-r--r-- | mesonbuild/modules/gnome.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index a6ae3f4..ffdfd42 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -224,12 +224,13 @@ _MK_ENUMS_COMMON_KWS: T.List[KwargInfo] = [ ] def annotations_validator(annotations: T.List[T.Union[str, T.List[str]]]) -> T.Optional[str]: - """Validate gdbus-codegen annotations argument""" badlist = 'must be made up of 3 strings for ELEMENT, KEY, and VALUE' - if all(isinstance(annot, str) for annot in annotations): + if not annotations: + return None + elif all(isinstance(annot, str) for annot in annotations): if len(annotations) == 3: return None else: |