[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] gnulib-tool.py: Handle module dependencies that cannot be found.
From: |
Collin Funk |
Subject: |
[PATCH] gnulib-tool.py: Handle module dependencies that cannot be found. |
Date: |
Tue, 7 May 2024 17:14:53 -0700 |
* pygnulib/GLModuleSystem.py
(GLModule.getDependenciesWithoutConditions): Filter out None from the
module dependencies. An appropriate warning will already be printed by
GLModuleSystem.find().
---
ChangeLog | 8 ++++++++
pygnulib/GLModuleSystem.py | 5 ++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 21f4039dfe..b752fde065 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-05-07 Collin Funk <collin.funk1@gmail.com>
+
+ gnulib-tool.py: Handle module dependencies that cannot be found.
+ * pygnulib/GLModuleSystem.py
+ (GLModule.getDependenciesWithoutConditions): Filter out None from the
+ module dependencies. An appropriate warning will already be printed by
+ GLModuleSystem.find().
+
2024-05-07 Paul Eggert <eggert@cs.ucla.edu>
nstrftime: use clearer code for padding
diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py
index 2cb5d1d468..b25779d62e 100644
--- a/pygnulib/GLModuleSystem.py
+++ b/pygnulib/GLModuleSystem.py
@@ -504,7 +504,7 @@ def getDependencies(self) -> str:
self.cache['dependencies'] = result
return self.cache['dependencies']
- def getDependenciesWithoutConditions(self) -> list[GLModule | None]:
+ def getDependenciesWithoutConditions(self) -> list[GLModule]:
'''Return list of dependencies, as a list of GLModule objects.
GLConfig: localpath.'''
if 'dependenciesWithoutCond' not in self.cache:
@@ -518,6 +518,9 @@ def getDependenciesWithoutConditions(self) -> list[GLModule
| None]:
result = [ self.modulesystem.find(module)
for module in lines
if module != '' ]
+ result = [ module
+ for module in result
+ if module is not None ]
self.cache['dependenciesWithoutCond'] = result
return self.cache['dependenciesWithoutCond']
--
2.45.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] gnulib-tool.py: Handle module dependencies that cannot be found.,
Collin Funk <=