Skip to content

Commit 5bb18ec

Browse files
committed
Merge license list 3.5
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
2 parents 548e785 + ee7b6a5 commit 5bb18ec

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

spdx/config.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def load_license_list(file_name):
3535
licenses_map = {}
3636
with codecs.open(file_name, 'rb', encoding='utf-8') as lics:
3737
licenses = json.load(lics)
38-
version, _, _ = licenses['licenseListVersion'].split('-')
38+
version = licenses['licenseListVersion'].split('.')
3939
for lic in licenses['licenses']:
4040
if lic.get('isDeprecatedLicenseId'):
4141
continue
@@ -55,7 +55,7 @@ def load_exception_list(file_name):
5555
exceptions_map = {}
5656
with codecs.open(file_name, 'rb', encoding='utf-8') as excs:
5757
exceptions = json.load(excs)
58-
version, _, _ = exceptions['licenseListVersion'].split('-')
58+
version = exceptions['licenseListVersion'].split('.')
5959
for exc in exceptions['exceptions']:
6060
if exc.get('isDeprecatedLicenseId'):
6161
continue
@@ -66,8 +66,8 @@ def load_exception_list(file_name):
6666
return version, exceptions_map
6767

6868

69-
_version, LICENSE_MAP = load_license_list(_licenses)
70-
LICENSE_LIST_VERSION = Version.from_str(_version)
69+
(_major, _minor), LICENSE_MAP = load_license_list(_licenses)
70+
LICENSE_LIST_VERSION = Version(major=_major, minor=_minor)
7171

72-
_version, EXCEPTION_MAP = load_exception_list(_exceptions)
73-
EXCEPTION_LIST_VERSION = Version.from_str(_version)
72+
(_major, _minor), EXCEPTION_MAP = load_exception_list(_exceptions)
73+
EXCEPTION_LIST_VERSION = Version(major=_major, minor=_minor)

tests/test_document.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,6 @@ def test_from_identifier(self):
403403

404404

405405
class TestException(TestCase):
406-
maxDiff = None
407406

408407
def test_exception_list(self):
409408
assert EXCEPTION_MAP['Linux Syscall Note'] == 'Linux-syscall-note'

0 commit comments

Comments
 (0)