summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--pygnulib/constants.py4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ba5540243e..1d642ca30f 100644
--- 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.
diff --git a/pygnulib/constants.py b/pygnulib/constants.py
index 10bd363f5b..91a2958eb3 100644
--- a/pygnulib/constants.py
+++ b/pygnulib/constants.py
@@ -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)