From f576c251b86f120d7a17961096e2a8afe4bd66ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Borgstr=C3=B6m?= Date: Fri, 15 Oct 2010 19:33:15 +0200 Subject: [PATCH] Fix cache reinitalization. --- dedupestore/cache.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dedupestore/cache.py b/dedupestore/cache.py index 5a64324ab..3eb9d0f42 100644 --- a/dedupestore/cache.py +++ b/dedupestore/cache.py @@ -37,17 +37,16 @@ class Cache(object): def init(self): """Initializes cache by fetching and reading all archive indicies """ - self.summap = {} self.chunkmap = {} self.archives = [] self.tid = self.store.tid if self.store.tid == 0: return print 'Recreating cache...' - for id in self.store.list(NS_ARCHIVES): + for id in list(self.store.list(NS_ARCHIVES)): archive = cPickle.loads(zlib.decompress(self.store.get(NS_ARCHIVES, id))) self.archives.append(archive['name']) - for id, sum, csize, osize in archive['chunks']: + for id, csize, osize in archive['chunks']: if self.seen_chunk(id): self.chunk_incref(id) else: