Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nxd-bom
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
nxd-bom
Commits
dd3a4931
Commit
dd3a4931
authored
Jun 12, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
9a41b3bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
nxdbom/__init__.py
nxdbom/__init__.py
+7
-5
No files found.
nxdbom/__init__.py
View file @
dd3a4931
...
...
@@ -544,9 +544,10 @@ def spdx_license_canon(license_name):
# XXX split on ';' ',' 'and' 'or'
# XXX split as if list ['MIT', 'BSD'] (pystemmer)
lic
=
license_name
.
strip
()
lic
=
removeprefix
(
"deprecaed_"
,
lic
)
lic
=
removeprefix
(
lic
,
"deprecated_"
)
lic
=
removesuffix
(
lic
,
"-only"
)
if
lic
.
endswith
(
'-or-later'
):
lic
=
removesuf
ix
(
lid
,
'-or-later'
)
lic
=
removesuf
fix
(
lic
,
'-or-later'
)
lic
+=
'+'
spdx
=
_licrevdb
.
get
(
lic
)
if
spdx
is
None
:
...
...
@@ -607,10 +608,11 @@ def license_of(url):
licv
=
licv
.
decode
(
'utf-8'
)
licv
=
licv
.
splitlines
()
assert
licv
[
0
]
==
xpath
,
(
licv
[
0
],
xpath
)
licv
=
licv
[
1
:]
# first best match
licv
=
licv
[
1
:]
#print(licv, file=sys.stderr)
lic
=
licv
[
0
]
if
licv
==
"no license file was found"
:
lic
=
licv
[
0
]
# first best match
lic
=
lic
.
strip
()
if
lic
==
"no license file was found"
:
lic
=
''
else
:
lic
=
lic
.
split
(
None
,
1
)[
1
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment