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 3485
Build 4508: tox-on-jenkinsJenkins
Build 4507: arc lint + arc unit

Event Timeline

ardumont added inline comments.
swh/indexer/metadata_dictionary.py
227
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
227

shrugs

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

This revision was automatically updated to reflect the committed changes.