From 84d969199ecbf4f900c422f5173ff622580932d6 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Thu, 28 Sep 2017 21:08:01 +0300 Subject: [PATCH] pygnulib.py: simplify license conflicts detection --- pygnulib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.39.5