bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Subject: gnulib-tool.py: Print warnings just like gnulib-tool.sh
Date: Fri, 12 Apr 2024 15:29:24 +0200	[thread overview]
Message-ID: <7075860.OyWVimaKzB@nimes> (raw)

This patch fixes a test suite error:

./test-cache-1-31.err tmp3074843-err differ: byte 1, line 1
--- ./test-cache-1-31.err       2024-04-12 00:02:39.013521019 +0200
+++ tmp3074843-err      2024-04-12 14:03:20.355689866 +0200
@@ -1 +1 @@
-gnulib-tool: warning: --po-domain has no effect without a --po-base option
+.../gnulib-tool.py: warning: --po-domain has no effect without a --po-base option
FAIL: gnulib-tool's error output has unexpected differences.
FAIL: test-cache-1-31.sh

There's no need to print the absolute file name of gnulib-tool here, at
warnings.


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

	gnulib-tool.py: Print warnings just like gnulib-tool.sh.
	* pygnulib/main.py (main): When printing a warning, print just
	"gnulib-tool" instead of the absolute file name.

diff --git a/pygnulib/main.py b/pygnulib/main.py
index 5fec0ccc4a..9fadd4a4ea 100644
--- a/pygnulib/main.py
+++ b/pygnulib/main.py
@@ -709,7 +709,7 @@ def main() -> None:
         sys.stderr.write(message)
         sys.exit(1)
     if cmdargs.pobase == None and cmdargs.podomain != None:
-        message = '%s: warning: --po-domain has no effect without a --po-base option\n' % constants.APP['name']
+        message = 'gnulib-tool: warning: --po-domain has no effect without a --po-base option\n'
         sys.stderr.write(message)
     if mode != None and 'test' in mode and cmdargs.gnu_make:
         message = '%s: --gnu-make not supported when including tests\n' % constants.APP['name']
@@ -900,7 +900,7 @@ def main() -> None:
                         if module.getFiles():
                             print(name)
             else:
-                message = '%s: warning: file %s does not exist\n' % (constants.APP['name'], filename)
+                message = 'gnulib-tool: warning: file %s does not exist\n' % filename
                 sys.stderr.write(message)
 
     elif mode in ['import', 'add-import', 'remove-import', 'update']:





                 reply	other threads:[~2024-04-12 13:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7075860.OyWVimaKzB@nimes \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).