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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

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.