Page MenuHomeSoftware Heritage

D8138.diff
No OneTemporary

D8138.diff

diff --git a/swh/dataset/exporters/orc.py b/swh/dataset/exporters/orc.py
--- a/swh/dataset/exporters/orc.py
+++ b/swh/dataset/exporters/orc.py
@@ -375,11 +375,10 @@
content_writer = self.get_writer_for("content")
data = None
if self.with_data:
- obj_id = content[ID_HASH_ALGO]
try:
- data = self.objstorage.get(obj_id)
+ data = self.objstorage.get(content)
except ObjNotFoundError:
- logger.warning(f"Missing object {hash_to_hex(obj_id)}")
+ logger.warning("Missing object %s", hash_to_hex(content[ID_HASH_ALGO]))
content_writer.write(
(
diff --git a/swh/dataset/test/test_orc.py b/swh/dataset/test/test_orc.py
--- a/swh/dataset/test/test_orc.py
+++ b/swh/dataset/test/test_orc.py
@@ -327,7 +327,7 @@
obj_type = "content"
objstorage = get_objstorage("memory")
for content in TEST_OBJECTS[obj_type]:
- objstorage.add(content.data)
+ objstorage.add(content.data, content.hashes())
def get_objstorage_mock(**kw):
if kw.get("cls") == "mock":

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 17, 6:53 PM (2 d, 17 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3223481

Event Timeline