Page MenuHomeSoftware Heritage

Prevent license normalization from crashing on malformed input.
ClosedPublic

Authored by vlorentz on Jan 15 2019, 2:30 PM.

Diff Detail

Repository
rDCIDX Metadata indexer
Branch
harden-normalization
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 3520
Build 4560: tox-on-jenkinsJenkins
Build 4559: arc lint + arc unit

Event Timeline

ardumont added inline comments.
swh/indexer/metadata_dictionary.py
226
return {"@id": "https://spdx.org/licenses/" + s} if isinstance(s, str) else None

?

This revision is now accepted and ready to land.Jan 15 2019, 2:33 PM
vlorentz added inline comments.
swh/indexer/metadata_dictionary.py
226

shrugs

I'm not a huge fan of ternaries outside generator expressions

This revision was automatically updated to reflect the committed changes.