Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7343134
D413.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
971 B
Subscribers
None
D413.diff
View Options
diff --git a/swh/loader/pypi/loader.py b/swh/loader/pypi/loader.py
--- a/swh/loader/pypi/loader.py
+++ b/swh/loader/pypi/loader.py
@@ -103,14 +103,17 @@
snapshot (dict): Last snapshot for the visit
Returns:
- tuple artifact's filename, artifact's sha256
+ list of (filename, sha256) tuples.
"""
revs = [rev['target'] for rev in last_snapshot['branches'].values()]
known_revisions = self.storage.revision_get(revs)
+ ret = []
for revision in known_revisions:
- artifact = revision['metadata']['original_artifact']
- yield artifact['filename'], artifact['sha256']
+ if 'original_artifact' in revision['metadata']:
+ artifact = revision['metadata']['original_artifact']
+ ret.append((artifact['filename'], artifact['sha256']))
+ return ret
def _last_snapshot(self):
"""Retrieve the last snapshot
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mar 17 2025, 7:35 PM (7 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3219321
Attached To
D413: Make the previously loaded artifacts a list rather than an iterator
Event Timeline
Log In to Comment