]> Savannah Git Hosting - gnulib.git/commitdiff
pygnulib.py: simplify license conflicts detection
authorDmitry Selyutin <ghostmansd@gmail.com>
Thu, 28 Sep 2017 18:08:01 +0000 (21:08 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Thu, 28 Sep 2017 18:08:01 +0000 (21:08 +0300)
pygnulib.py

index fcddaaeed51124e7faadd92defc31294a59ab1ce..0324438ab4c3e6127aa540384ceaec4db30f4ad5 100755 (executable)
@@ -93,8 +93,9 @@ def import_hook(script, gnulib, namespace, verbosity, options, *args, **kwargs):
     # Determine license incompatibilities, if any.
     incompatibilities = set()
     if config.licenses & {"LGPLv2", "LGPLv2+", "LGPLv3", "LGPLv3+"}:
+        acceptable = IGNORED_LICENSES | config.licenses
         for (name, licenses) in ((module.name, module.licenses) for module in main):
-            if not ((IGNORED_LICENSES & licenses) or (config.licenses & licenses)):
+            if not (acceptable & licenses):
                 incompatibilities.add((name, licenses))
     if incompatibilities:
         print("{0}: *** incompatible license on modules:".format(script), file=sys.stderr)