west: spdx: Fix copyright parsing in REUSE 0.6.x
Fix broken copyright parsing. Since REUSE 6.0.0 the copyright_lines attribute has been removed. The new attribute copyright_notices is used. Additionally, the python package REUSE should now be at least v0.6.0. This will require an update of REUSE for users that were using a version earlier than 0.6. Fixes #98378 Signed-off-by: Simone Orru <simone.orru@secomind.com>
This commit is contained in:
@@ -24,7 +24,7 @@ pyserial
|
||||
requests>=2.32.4
|
||||
semver
|
||||
tqdm>=4.67.1
|
||||
reuse
|
||||
reuse>=6.0.0
|
||||
|
||||
# for ram/rom reports
|
||||
anytree
|
||||
|
||||
@@ -194,8 +194,8 @@ def getCopyrightInfo(filePath):
|
||||
copyrights = []
|
||||
|
||||
for info in infos:
|
||||
if info.copyright_lines:
|
||||
copyrights.extend(info.copyright_lines)
|
||||
for notice in info.copyright_notices:
|
||||
copyrights.extend([notice.original])
|
||||
|
||||
return copyrights
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user