From ed6d4e855f1e06fc81ac31060be6cb61f23ba965 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Mon, 1 Apr 2024 01:40:01 -0700 Subject: [PATCH 2/2] gnulib-tool.py: Only check existence for --extract-tests-module. * pygnulib/main.py (main): Check that the test module exists instead of looking it up and patching it if diff's are found. --- ChangeLog | 6 ++++++ pygnulib/main.py | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 056f8827dc..95b034ca21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-04-01 Collin Funk + + gnulib-tool.py: Only check existence for --extract-tests-module. + * pygnulib/main.py (main): Check that the test module exists instead of + looking it up and patching it if diff's are found. + 2024-04-01 Collin Funk gnulib-tool.py: Fix --extract-tests-module with a test module. diff --git a/pygnulib/main.py b/pygnulib/main.py index 688ab249f3..55d635d074 100644 --- a/pygnulib/main.py +++ b/pygnulib/main.py @@ -1268,9 +1268,8 @@ def main() -> None: modulesystem = classes.GLModuleSystem(config) for name in modules: module = modulesystem.find(name) - if module: - if module.getTestsModule(): - print(module.getTestsName()) + if module and modulesystem.exists(module.getTestsName()): + print(module.getTestsName()) elif mode == 'copy-file': srcpath = files[0] -- 2.44.0