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

ardumont created this revision.Jan 23 2020, 2:41 PM
anlambert requested changes to this revision.Jan 23 2020, 2:46 PM
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()
339–341

same here

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

nicer ;)

ardumont updated this revision to Diff 9203.Jan 23 2020, 2:54 PM

Improve instructions

anlambert accepted this revision.Jan 23 2020, 2:55 PM
This revision is now accepted and ready to land.Jan 23 2020, 2:55 PM
ardumont updated this revision to Diff 9204.Jan 23 2020, 3:07 PM

Plug to master branch