bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnulib-tool.py: Use same warning style as gnulib-tool.sh


From: Bruno Haible
Subject: gnulib-tool.py: Use same warning style as gnulib-tool.sh
Date: Thu, 18 Apr 2024 00:46:21 +0200

These two commands differ in the style of warning output:

$ ./gnulib-tool.sh --create-testdir --dir=../testdir2 --single-configure 
getpayloadl
gnulib-tool: warning: module getpayloadl depends on a module with an 
incompatible license: nan
gnulib-tool: warning: module getpayloadl depends on a module with an 
incompatible license: snan
...

$ ./gnulib-tool.py --create-testdir --dir=../testdir2 --single-configure 
getpayloadl
module getpayloadl depends on a module with an incompatible license: nan
module getpayloadl depends on a module with an incompatible license: snan
...

This patch fixes the difference.


2024-04-17  Bruno Haible  <bruno@clisp.org>

        gnulib-tool.py: Use same warning style as gnulib-tool.sh.
        * pygnulib/GLTestDir.py (GLTestDir.execute): Prefix the
        "incompatible license" message with "gnulib-tool: warning: ".

diff --git a/pygnulib/GLTestDir.py b/pygnulib/GLTestDir.py
index b668629f4d..38427e402e 100644
--- a/pygnulib/GLTestDir.py
+++ b/pygnulib/GLTestDir.py
@@ -242,8 +242,8 @@ def execute(self) -> None:
                             if license not in ['LGPLv2+']:
                                 incompatible = True
                         if incompatible:
-                            errormsg = 'module %s depends on a module with an 
incompatible license: %s\n' % (requested_module, module)
-                            sys.stderr.write(errormsg)
+                            warningmsg = 'module %s depends on a module with 
an incompatible license: %s' % (requested_module, module)
+                            sys.stderr.write('gnulib-tool: warning: %s\n' % 
warningmsg)
         self.config.setInclTestCategory(TESTS['tests'], saved_inctests)
 
         # Determine final module list.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]