Commit face1ef5 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 77702def
...@@ -109,9 +109,10 @@ def bom_software(installed_software_path): # -> {} (name,kind) -> PkgInfo ...@@ -109,9 +109,10 @@ def bom_software(installed_software_path): # -> {} (name,kind) -> PkgInfo
else: else:
raise NotImplementedError('TODO url for kind %r (urlpath: %r)' % (kind, urlpath)) raise NotImplementedError('TODO url for kind %r (urlpath: %r)' % (kind, urlpath))
if license and license.lower() == 'unknown':
license = None
if license is None: # XXX temp if license is None: # XXX temp
license = 'xxx' license = 'GPL-compatible'
# XXX "UNKNOWN" not ok
license = spdx_license_canon(license) license = spdx_license_canon(license)
info = PkgInfo(name, ver, kind, url, license) info = PkgInfo(name, ver, kind, url, license)
bkey = (name, kind) bkey = (name, kind)
...@@ -699,7 +700,7 @@ def fmt_bom(bom): # -> str ...@@ -699,7 +700,7 @@ def fmt_bom(bom): # -> str
info = bom[bkey] info = bom[bkey]
if info.kind == kind: if info.kind == kind:
# TODO autoalign # TODO autoalign
emit('%-28s %-10s %-10s %s' % (info.name, info.version, info.license, info.url)) emit('%-28s %-10s %-20s %s' % (info.name, info.version, info.license, info.url))
return ''.join(outv) return ''.join(outv)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment