More fixes in objects to be downloaded
This commit is contained in:
parent
bd1aead46e
commit
12205ee7ba
|
@ -121,7 +121,6 @@ class Missing(object):
|
||||||
def pull(self, count=1):
|
def pull(self, count=1):
|
||||||
if count < 1:
|
if count < 1:
|
||||||
raise ValueError("Must be at least one")
|
raise ValueError("Must be at least one")
|
||||||
with self.lock:
|
|
||||||
objectHashes = []
|
objectHashes = []
|
||||||
try:
|
try:
|
||||||
for objectHash in self.hashes.keys():
|
for objectHash in self.hashes.keys():
|
||||||
|
@ -134,7 +133,7 @@ class Missing(object):
|
||||||
self.removeObjectFromCurrentThread(objectHash)
|
self.removeObjectFromCurrentThread(objectHash)
|
||||||
if len(objectHashes) >= count:
|
if len(objectHashes) >= count:
|
||||||
break
|
break
|
||||||
except RuntimeError:
|
except (RuntimeError, KeyError, ValueError):
|
||||||
# the for cycle sometimes breaks if you remove elements
|
# the for cycle sometimes breaks if you remove elements
|
||||||
pass
|
pass
|
||||||
return objectHashes
|
return objectHashes
|
||||||
|
|
Loading…
Reference in New Issue
Block a user