Page MenuHomeSoftware Heritage

Storage.release_get: Yield None for non-existent release

Authored by anlambert on Nov 27 2018, 3:53 PM.



I noticed that when trying to query or browse a non-existent release id, for instance,
no exception were raised and thus errors appear.

The issue comes from the storage layer who does not yield None when trying
to retrieve a non-existent release.

That diff implements the same behaviour as in Storage.revision_get, ensuring None
is returned when querying a non-existent release.

Test Plan

Tests have been updated to reflect the change.

Diff Detail

rDSTO Storage manager
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

anlambert created this revision.Nov 27 2018, 3:53 PM
vlorentz accepted this revision.Nov 27 2018, 5:11 PM

Needs docstring updates.

This revision is now accepted and ready to land.Nov 27 2018, 5:11 PM
anlambert updated this revision to Diff 2264.Nov 27 2018, 5:20 PM

Update docstrings

This revision was automatically updated to reflect the committed changes.