Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7123066
D8138.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D8138.diff
View Options
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
Details
Attached
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
Attached To
D8138: Update for swh-objstorage >= 2.0.0
Event Timeline
Log In to Comment