changeset 39132:3c71495e5b9c

generator: fix gl_LGPL macro if --lgpl given
author Dmitry Selyutin <ghostmansd@gmail.com>
date Thu, 05 Jul 2018 00:33:22 +0300
parents 2d3293c203fa
children 973bdd5e2cdc
files pygnulib/generator.py
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/pygnulib/generator.py	Thu Jul 05 00:06:31 2018 +0300
+++ b/pygnulib/generator.py	Thu Jul 05 00:33:22 2018 +0300
@@ -942,11 +942,12 @@
     if config.tests:
         yield "gl_WITH_TESTS"
     yield "gl_LIB([{}])".format(config.libname)
-    lgpl = _LGPL[tuple(sorted(config.licenses))]
-    if lgpl != "yes":
-        yield f"gl_LGPL([{lgpl}])"
-    else:
-        yield "gl_LGPL([])"
+    if tuple(config.licenses) in _LGPL:
+        lgpl = _LGPL[tuple(sorted(config.licenses))]
+        if lgpl != "yes":
+            yield f"gl_LGPL([{lgpl}])"
+        else:
+            yield "gl_LGPL([])"
     if config.makefile_name:
         yield f"gl_MAKEFILE_NAME([{config.makefile_name}])"
     else: