From: Dmitry Selyutin Date: Thu, 28 Sep 2017 18:08:01 +0000 (+0300) Subject: pygnulib.py: simplify license conflicts detection X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=84d969199ecbf4f900c422f5173ff622580932d6;p=gnulib.git pygnulib.py: simplify license conflicts detection --- diff --git a/pygnulib.py b/pygnulib.py index fcddaaeed5..0324438ab4 100755 --- a/pygnulib.py +++ b/pygnulib.py @@ -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)