diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2021-04-09 14:30:58 -0400 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2021-05-28 15:17:10 -0400 |
commit | a734bcfc83a67788f71b5b84a46a4d9727b5ec09 (patch) | |
tree | c36f478aea7a741cbe78d8ba4a5ad0fb5c112d0e /mesonbuild/modules/i18n.py | |
parent | 3340284805b96a4b9b62405f626020276341944c (diff) | |
download | meson-a734bcfc83a67788f71b5b84a46a4d9727b5ec09.zip meson-a734bcfc83a67788f71b5b84a46a4d9727b5ec09.tar.gz meson-a734bcfc83a67788f71b5b84a46a4d9727b5ec09.tar.bz2 |
modules: Stop using ModuleReturnValue where it's not needed
It is only needed in functions that need to add targets to the
interpreter.
Diffstat (limited to 'mesonbuild/modules/i18n.py')
-rw-r--r-- | mesonbuild/modules/i18n.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/modules/i18n.py b/mesonbuild/modules/i18n.py index afa7287..b915745 100644 --- a/mesonbuild/modules/i18n.py +++ b/mesonbuild/modules/i18n.py @@ -61,7 +61,6 @@ class I18nModule(ExtensionModule): @staticmethod def nogettext_warning(): mlog.warning('Gettext not found, all translation targets will be ignored.', once=True) - return ModuleReturnValue(None, []) @staticmethod def _get_data_dirs(state, dirs): @@ -74,7 +73,8 @@ class I18nModule(ExtensionModule): @permittedKwargs(build.CustomTarget.known_kwargs | {'data_dirs', 'po_dir', 'type', 'args'}) def merge_file(self, state, args, kwargs): if not shutil.which('xgettext'): - return self.nogettext_warning() + self.nogettext_warning() + return podir = kwargs.pop('po_dir', None) if not podir: raise MesonException('i18n: po_dir is a required kwarg') @@ -128,7 +128,8 @@ class I18nModule(ExtensionModule): if len(args) != 1: raise coredata.MesonException('Gettext requires one positional argument (package name).') if not shutil.which('xgettext'): - return self.nogettext_warning() + self.nogettext_warning() + return packagename = args[0] languages = mesonlib.stringlistify(kwargs.get('languages', [])) datadirs = self._get_data_dirs(state, mesonlib.stringlistify(kwargs.get('data_dirs', []))) |