]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool.py: Write errors to stderr, not stdout.
authorBruno Haible <bruno@clisp.org>
Sun, 31 Jul 2022 20:35:30 +0000 (22:35 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 31 Jul 2022 21:52:55 +0000 (23:52 +0200)
* pygnulib/constants.py: Write error messages to stderr, not stdout.

ChangeLog
pygnulib/constants.py

index ba5540243e3783b4502d232bfd3a64b29f23869e..1d642ca30f0fe1d81ffa8386bd138e592cd5e0b4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2022-07-31  Bruno Haible  <bruno@clisp.org>
 
+       gnulib-tool.py: Write errors to stderr, not stdout.
+       * pygnulib/constants.py: Write error messages to stderr, not stdout.
+
        gnulib-tool.py: Use mainstream coding style.
        * pygnulib/GLConfig.py: Use 'raise' to re-throw an exception.
 
index 10bd363f5bf11041354cf045d31ebb9d4c7e2353..91a2958eb3ae441692ac738e0a4d7e41bb222333 100644 (file)
@@ -213,7 +213,7 @@ def execute(args, verbose):
         try:  # Try to run
             retcode = sp.call(args)
         except Exception as error:
-            print(error)
+            sys.stderr.write(str(error) + '\n')
             sys.exit(1)
     else:
         # Commands like automake produce output to stderr even when they succeed.
@@ -223,7 +223,7 @@ def execute(args, verbose):
         try:  # Try to run
             retcode = sp.call(xargs, shell=True)
         except Exception as error:
-            print(error)
+            sys.stderr.write(str(error) + '\n')
             sys.exit(1)
         if retcode == 0:
             os.remove(temp)