]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool.py: Fix the modules indentation in --create-testdir' output.
authorBruno Haible <bruno@clisp.org>
Sun, 24 Mar 2024 02:18:24 +0000 (03:18 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 24 Mar 2024 02:18:24 +0000 (03:18 +0100)
* pygnulib/GLTestDir.py (GLTestDir.execute): Use specified_modules
instead of self.config.getModules(), since the latter may be empty.

ChangeLog
pygnulib/GLTestDir.py

index 0f8f5bb12179ef695221a0eff1d3d13252b66aa6..6f2c22b9b63d1b44456e7ac0ae321fd1226d93af 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-03-23  Bruno Haible  <bruno@clisp.org>
+
+       gnulib-tool.py: Fix the modules indentation in --create-testdir' output.
+       * pygnulib/GLTestDir.py (GLTestDir.execute): Use specified_modules
+       instead of self.config.getModules(), since the latter may be empty.
+
 2024-03-23  Bruno Haible  <bruno@clisp.org>
 
        gnulib-tool.sh: Use a default auxdir in --extract-automake-snippet.
index 7feddc0bfe8c3229f5c8d9c0fa434d71458ecdca..c618241bc961361e8b6eaf41d53eff60197ddde2 100644 (file)
@@ -269,10 +269,12 @@ class GLTestDir(object):
                 bold_on = '\x1b[1m'
                 bold_off = '\x1b[0m'
             print('Module list with included dependencies (indented):')
+            specified_modules_set = { str(module)
+                                      for module in specified_modules }
             for module in final_modules:
-                if str(module) in self.config.getModules():
+                if str(module) in specified_modules_set:
                     print('  %s%s%s' % (bold_on, module, bold_off))
-                else:  # if str(module) not in self.config.getModules()
+                else:  # if str(module) not in specified_modules_set
                     print('    %s' % module)
 
         # Generate lists of the modules.