summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYegor Yefremov <yegorslists@googlemail.com>2018-02-26 13:01:18 (GMT)
committerPeter Korsgaard <peter@korsgaard.com>2018-02-26 19:55:19 (GMT)
commitc46f72b61e4dc989f520271bc98f7b15015fcdcf (patch)
treea535b4435ed7296365057a2d51be51eb0f170ecc
parentcfafcfa9af4ee04c563d3c682d2001a8516a866c (diff)
downloadbuildroot-c46f72b61e4dc989f520271bc98f7b15015fcdcf.tar.gz
buildroot-c46f72b61e4dc989f520271bc98f7b15015fcdcf.tar.bz2
scanpypi: fix licence detection handling for unknown licences
Check for match object not being None. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rwxr-xr-xutils/scanpypi2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/scanpypi b/utils/scanpypi
index 1720c0c..14ee877 100755
--- a/utils/scanpypi
+++ b/utils/scanpypi
@@ -436,7 +436,7 @@ class BuildrootPackage():
for license_file in license_files:
with open(license_file) as lic_file:
match = liclookup.match(lic_file.read())
- if match.confidence >= 90.0:
+ if match is not None and match.confidence >= 90.0:
license_names.append(match.license.id)
if len(license_names) > 0: