Browse Source

fix double delete in rebuild_refcounts

in case of the Manifest having an IntegrityError,
the entry for the manifest was already deleted.
Thomas Waldmann 8 years ago
parent
commit
726051b9d1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/borg/archive.py

+ 2 - 2
src/borg/archive.py

@@ -1328,8 +1328,8 @@ class ArchiveChecker:
 
         Missing and/or incorrect data is repaired when detected
         """
-        # Exclude the manifest from chunks
-        del self.chunks[Manifest.MANIFEST_ID]
+        # Exclude the manifest from chunks (manifest entry might be already deleted from self.chunks)
+        self.chunks.pop(Manifest.MANIFEST_ID, None)
 
         def mark_as_possibly_superseded(id_):
             if self.chunks.get(id_, ChunkIndexEntry(0, 0, 0)).refcount == 0: