[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnulib-tool.py: Fix some unbound variables.
From: |
Collin Funk |
Subject: |
gnulib-tool.py: Fix some unbound variables. |
Date: |
Tue, 9 Apr 2024 10:57:51 -0700 |
User-agent: |
Mozilla Thunderbird |
In GLEmiter.autoconfSnippets I see many warnings that a 'solution'
variable may be unbound when it is used.
if solution: # Solution may be unbound here.
emit += self.autoconfSnippet(module, toplevel,
disable_libtool, disable_gettext,
replace_auxdir, ' ')
It seems that the unbound variable will evaluate to 'False', which
would explain why it still works. Still not good practice. :)
This patch silences the warning by initializing solution to False at
the start of each loop. Easy fix.
Collin
0001-gnulib-tool.py-Fix-some-unbound-variables.patch
Description: Text Data
- gnulib-tool.py: Fix some unbound variables.,
Collin Funk <=