mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 13:46:32 +00:00
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>
This commit is contained in:
parent
cfafcfa9af
commit
c46f72b61e
@ -436,7 +436,7 @@ class BuildrootPackage():
|
|||||||
for license_file in license_files:
|
for license_file in license_files:
|
||||||
with open(license_file) as lic_file:
|
with open(license_file) as lic_file:
|
||||||
match = liclookup.match(lic_file.read())
|
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)
|
license_names.append(match.license.id)
|
||||||
|
|
||||||
if len(license_names) > 0:
|
if len(license_names) > 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user