Merge pull request #8929 from ThomasWaldmann/issue-8928

compact: fix cleaning archives directory
This commit is contained in:
TW 2025-06-17 17:01:30 +02:00 committed by GitHub
commit 963fc6b869
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -166,8 +166,8 @@ class ArchiveGarbageCollector:
name, id, hex_id = archive_info.name, archive_info.id, bin_to_hex(archive_info.id)
try:
self.manifest.archives.nuke_by_id(id)
except KeyError:
self.print_warning(f"Archive {name} {hex_id} not found.")
except self.repository.ObjectNotFound:
logger.warning(f"Soft-deleted archive {name} {hex_id} not found.")
repo_size_before = self.repository_size
logger.info("Determining unused objects...")