summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2010-12-04 15:03:36 +0000
committerLars Wirzenius <liw@liw.fi>2010-12-04 15:03:36 +0000
commit66f424d2117f3d08b9f061a5ed43f2fd24e8df50 (patch)
tree800e1011b7e353a2b05e5b7a2d7c2b804d1a1524
parent8054939afc603ea0f25a1c134799335a6b533211 (diff)
downloadobnam-66f424d2117f3d08b9f061a5ed43f2fd24e8df50.tar.gz
Do not create useless new trees for every remove.
Caller has locked the tree, so we can just edit the latest tree.
-rw-r--r--obnamlib/checksumtree.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/obnamlib/checksumtree.py b/obnamlib/checksumtree.py
index 4b5df76e..3e2a6daa 100644
--- a/obnamlib/checksumtree.py
+++ b/obnamlib/checksumtree.py
@@ -63,7 +63,7 @@ class ChecksumTree(obnamlib.StoreTree):
def remove(self, checksum, chunk_id, client_id):
self.require_forest()
if self.forest.trees:
- t = self.forest.new_tree(self.forest.trees[-1])
+ t = self.forest.trees[-1]
key = self.key(checksum, chunk_id, client_id)
t.remove_range(key, key)