projects
/
pithos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dff7b6f
)
Avoid duplicates in missing hashes reports.
author
Antony Chazapis
<chazapis@gmail.com>
Mon, 12 Sep 2011 07:00:05 +0000
(10:00 +0300)
committer
Antony Chazapis
<chazapis@gmail.com>
Mon, 12 Sep 2011 07:00:05 +0000
(10:00 +0300)
pithos/backends/lib/hashfiler/blocker.py
patch
|
blob
|
history
diff --git
a/pithos/backends/lib/hashfiler/blocker.py
b/pithos/backends/lib/hashfiler/blocker.py
index
4081e71
..
817376b
100644
(file)
--- a/
pithos/backends/lib/hashfiler/blocker.py
+++ b/
pithos/backends/lib/hashfiler/blocker.py
@@
-98,7
+98,14
@@
class Blocker(object):
"""Check hashes for existence and
return those missing from block storage.
"""
- return [h for h in hashes if not self._check_rear_block(h)]
+ notfound = []
+ append = notfound.append
+
+ for h in hashes:
+ if h not in notfound and not self._check_rear_block(h):
+ append(h)
+
+ return notfound
def block_retr(self, hashes):
"""Retrieve blocks from storage by their hashes."""