Skip to content
Snippets Groups Projects
Commit f711c20e authored by Antoine Pietri's avatar Antoine Pietri
Browse files

vault: more explicit DirectoryBuilder variable names

parent 7e15b4b9
No related branches found
No related tags found
1 merge request!50vault: more explicit DirectoryBuilder variable names
......@@ -23,8 +23,8 @@ class DirectoryCooker(BaseVaultCooker):
"""
# Create the bytes that corresponds to the compressed
# directory.
directory_cooker = DirectoryBuilder(self.storage)
bundle_content = directory_cooker.get_directory_bytes(obj_id)
directory_builder = DirectoryBuilder(self.storage)
bundle_content = directory_builder.get_directory_bytes(obj_id)
# Cache the bundle
self.update_cache(obj_id, bundle_content)
# Make a notification that the bundle have been cooked
......
......@@ -25,14 +25,14 @@ class RevisionFlatCooker(BaseVaultCooker):
bytes that correspond to the bundle
"""
directory_cooker = DirectoryBuilder(self.storage)
directory_builder = DirectoryBuilder(self.storage)
with tempfile.TemporaryDirectory(suffix='.cook') as root_tmp:
root = Path(root_tmp)
for revision in self.storage.revision_log([obj_id]):
revdir = root / hashutil.hash_to_hex(revision['id'])
revdir.mkdir()
directory_cooker.build_directory(revision['directory'],
str(revdir).encode())
directory_builder.build_directory(revision['directory'],
str(revdir).encode())
bundle_content = get_tar_bytes(root_tmp,
hashutil.hash_to_hex(obj_id))
# Cache the bundle
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment