+2024-04-21 Collin Funk <collin.funk1@gmail.com>
+
+ gnulib-tool.py: Don't fail when given a bad module name.
+ * pygnulib/GLTestDir.py (GLTestDir.execute): Don't include None in the
+ list of GLModule objects.
+ * pygnulib/GLModuleSystem.py (GLModuleSystem.find): Document the meaning
+ of the None return.
+
2024-04-21 Collin Funk <collin.funk1@gmail.com>
gnulib-tool.py: Update type hints and docstring.
return result
def find(self, module: str) -> GLModule | None:
- '''Find the given module.'''
+ '''Return the GLModule object given the module name,
+ or None if the module description file with that name does not exist.
+ - module, The name of the module.'''
if type(module) is not str:
raise TypeError('module must be a string, not %s'
% type(module).__name__)
'mountlist', 'lib-ignore']]
# Canonicalize the list of specified modules.
- specified_modules = sorted(set(specified_modules))
- specified_modules = [ self.modulesystem.find(m)
- for m in specified_modules ]
+ modules = set()
+ for name in specified_modules:
+ module = self.modulesystem.find(name)
+ if module is not None:
+ modules.add(module)
+ specified_modules = sorted(modules)
# Test modules which invoke AC_CONFIG_FILES cannot be used with
# --with-tests --single-configure. Avoid them.