[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnulib-tool.py: Don't fail when given a bad module name.
From: |
Collin Funk |
Subject: |
gnulib-tool.py: Don't fail when given a bad module name. |
Date: |
Sat, 20 Apr 2024 20:43:48 -0700 |
User-agent: |
Mozilla Thunderbird |
When using --create-testdir with a bad module name:
$ gnulib-tool.py --create-testdir --dir aaa bad-module-name
gnulib-tool: warning: module bad-module-name doesn't exist
Traceback (most recent call last):
File "/home/collin/.local/src/gnulib/.gnulib-tool.py", line 30, in <module>
main.main_with_exception_handling()
File "/home/collin/.local/src/gnulib/pygnulib/main.py", line 1382, in
main_with_exception_handling
main()
File "/home/collin/.local/src/gnulib/pygnulib/main.py", line 1075, in main
testdir.execute()
File "/home/collin/.local/src/gnulib/pygnulib/GLTestDir.py", line 209, in
execute
requested_licence = requested_module.getLicense()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'getLicense'
This patch removes None from the list of GLModule objects before using
them.
I also documented the meaning of a None return in
GLModuleSystem.find() since this problem occurred in GLImport
previously.
Collin
0001-gnulib-tool.py-Don-t-fail-when-given-a-bad-module-na.patch
Description: Text Data
- gnulib-tool.py: Don't fail when given a bad module name.,
Collin Funk <=