Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9336994
D874.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
788 B
Subscribers
None
D874.diff
View Options
diff --git a/swh/indexer/indexer.py b/swh/indexer/indexer.py
--- a/swh/indexer/indexer.py
+++ b/swh/indexer/indexer.py
@@ -336,7 +336,7 @@
- store the results (according to policy_update)
Args:
- ids ([bytes]): sha1's identifier list
+ ids (Iterable[Union[bytes, str]]): sha1's identifier list
policy_update (str): either 'update-dups' or 'ignore-dups' to
respectively update duplicates or ignore
them
@@ -346,6 +346,8 @@
**kwargs: passed to the `index` method
"""
+ ids = [hashutil.hash_to_bytes(id_) if isinstance(id_, str) else id_
+ for id_ in ids]
results = []
try:
for sha1 in ids:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jul 3 2025, 7:50 AM (10 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3220473
Attached To
D874: ContentIndexer: convert hash to bytes.
Event Timeline
Log In to Comment