projects
/
buildroot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cfafcfa
)
scanpypi: fix licence detection handling for unknown licences
author
Yegor Yefremov
<yegorslists@googlemail.com>
Mon, 26 Feb 2018 13:01:18 +0000
(14:01 +0100)
committer
Peter Korsgaard
<peter@korsgaard.com>
Mon, 26 Feb 2018 19:55:19 +0000
(20:55 +0100)
Check for match object not being None.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
utils/scanpypi
patch
|
blob
|
history
diff --git
a/utils/scanpypi
b/utils/scanpypi
index 1720c0c0517219d99ccb18a394396b698b928628..14ee87784af57510649fecc0336ebd4aae5120cf 100755
(executable)
--- 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: