bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Collin Funk <collin.funk1@gmail.com>
To: bug-gnulib@gnu.org
Subject: [PATCH] gnulib-tool.py: Comment out undefined variable.
Date: Wed, 21 Feb 2024 03:36:15 -0800	[thread overview]
Message-ID: <28bebd33-fb40-4d40-9ec2-87988d82c10a@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 946 bytes --]

I started to look at the Python gnulib-tool and ran into this error that
should be easily reproducible:

[collin@debian src]$ gnulib-tool.py --create-testdir --dir test dummy
Module list with included dependencies (indented):
File list:
Traceback (most recent call last):
  File "/home/collin/.local/bin/gnulib-tool.py", line 1171, in <module>
  File "/home/collin/.local/bin/gnulib-tool.py", line 908, in main
  File "/home/collin/.local/src/gnulib/pygnulib/GLTestDir.py", line 503,
in execute
NameError: name 'saved_auxdir' is not defined

I commented out the offending line instead of removing it just in case
it is useful in the future. The previous command should work with the
dummy module so I can start comparing the output while learning the code.

[-- Attachment #2: 0001-gnulib-tool.py-Comment-out-undefined-variable.patch --]
[-- Type: text/x-patch, Size: 1417 bytes --]

From 6d94d65bfb0afc77c28b9c3a4633d156eb94906a Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.funk1@gmail.com>
Date: Wed, 21 Feb 2024 03:25:37 -0800
Subject: [PATCH] gnulib-tool.py: Comment out undefined variable.

* pygnulib/GLTestDir.py (GLTestDir.execute): Comment out line
that causes a NameError exception when executed.
 ChangeLog             | 6 ++++++
 pygnulib/GLTestDir.py | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index dfc1641e74..60c3dd4e8c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-02-21  Collin Funk  <collin.funk1@gmail.com>
+	gnulib-tool.py: Comment out undefined variable.
+	* pygnulib/GLTestDir.py (GLTestDir.execute): Comment out line
+	that causes a NameError exception when executed.
 2024-02-20  Bruno Haible  <bruno@clisp.org>
 	unimetadata/u-version: Add tests.
diff --git a/pygnulib/GLTestDir.py b/pygnulib/GLTestDir.py
index ae8537cff4..52171fdd9e 100644
--- a/pygnulib/GLTestDir.py
+++ b/pygnulib/GLTestDir.py
@@ -500,7 +500,8 @@ class GLTestDir(object):
                 # Restore changed variables.
-                self.config.setAuxDir(saved_auxdir)
+                # FIXME: Undefined?
+                # self.config.setAuxDir(saved_auxdir)
                 auxdir = self.config['auxdir']
                 subdirs_with_configure_ac += [testsbase]

             reply	other threads:[~2024-02-21 15:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21 11:36 Collin Funk [this message]
2024-02-21 16:08 ` [PATCH] gnulib-tool.py: Comment out undefined variable Bruno Haible
2024-02-21 17:17   ` Collin Funk
2024-02-21 17:29     ` Bruno Haible

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:

  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=28bebd33-fb40-4d40-9ec2-87988d82c10a@gmail.com \
    --to=collin.funk1@gmail.com \
    --cc=bug-gnulib@gnu.org \


* 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).