Changeset View
Changeset View
Standalone View
Standalone View
swh/dataset/exporters/orc.py
Show First 20 Lines • Show All 369 Lines • ▼ Show 20 Lines | def process_directory(self, directory): | ||||
entry["perms"], | entry["perms"], | ||||
) | ) | ||||
) | ) | ||||
def process_content(self, content): | def process_content(self, content): | ||||
content_writer = self.get_writer_for("content") | content_writer = self.get_writer_for("content") | ||||
data = None | data = None | ||||
if self.with_data: | if self.with_data: | ||||
obj_id = content[ID_HASH_ALGO] | |||||
try: | try: | ||||
data = self.objstorage.get(obj_id) | data = self.objstorage.get(content) | ||||
except ObjNotFoundError: | 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( | content_writer.write( | ||||
( | ( | ||||
hash_to_hex_or_none(content["sha1"]), | hash_to_hex_or_none(content["sha1"]), | ||||
hash_to_hex_or_none(content["sha1_git"]), | hash_to_hex_or_none(content["sha1_git"]), | ||||
hash_to_hex_or_none(content["sha256"]), | hash_to_hex_or_none(content["sha256"]), | ||||
hash_to_hex_or_none(content["blake2s256"]), | hash_to_hex_or_none(content["blake2s256"]), | ||||
content["length"], | content["length"], | ||||
Show All 18 Lines |