Page MenuHomeSoftware Heritage

package.loader: Fix edge case when some listing returns no content somehow
ClosedPublic

Authored by ardumont on Jan 23 2020, 2:41 PM.

Details

Summary

Also align that behavior for directories.

See [1] for an error instance.

[1] https://sentry.softwareheritage.org/share/issue/b3d7333ec47745f7a5fcdc951d5fc6ab/

Test Plan

tox

Diff Detail

Repository
rDLDBASE Generic VCS/Package Loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

anlambert added a subscriber: anlambert.
anlambert added inline comments.
swh/loader/package/loader.py
329–330

Nitpick, I would rather write:

contents = objects.get('content', {}).values()
338–340

same here

This revision now requires changes to proceed.Jan 23 2020, 2:46 PM
swh/loader/package/loader.py
329–330

nicer ;)

This revision is now accepted and ready to land.Jan 23 2020, 2:55 PM