Page MenuHomeSoftware Heritage

D874.diff
No OneTemporary

D874.diff

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

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

Event Timeline