fix inconsistency in how blob_hashes_to_send is used, preventing proper reflecting
This commit is contained in:
parent
010a1019fe
commit
0a919c3eab
1 changed files with 5 additions and 4 deletions
|
@ -124,8 +124,8 @@ class EncryptedFileReflectorClient(Protocol):
|
||||||
|
|
||||||
def set_blobs_to_send(self, blobs_to_send):
|
def set_blobs_to_send(self, blobs_to_send):
|
||||||
for blob in blobs_to_send:
|
for blob in blobs_to_send:
|
||||||
if blob not in self.blob_hashes_to_send:
|
if blob.blob_hash not in self.blob_hashes_to_send:
|
||||||
self.blob_hashes_to_send.append(blob)
|
self.blob_hashes_to_send.append(blob.blob_hash)
|
||||||
|
|
||||||
def get_blobs_to_send(self):
|
def get_blobs_to_send(self):
|
||||||
def _show_missing_blobs(filtered):
|
def _show_missing_blobs(filtered):
|
||||||
|
@ -308,9 +308,10 @@ class EncryptedFileReflectorClient(Protocol):
|
||||||
return d
|
return d
|
||||||
elif self.blob_hashes_to_send:
|
elif self.blob_hashes_to_send:
|
||||||
# open the next blob to send
|
# open the next blob to send
|
||||||
blob = self.blob_hashes_to_send[0]
|
blob_hash = self.blob_hashes_to_send[0]
|
||||||
self.blob_hashes_to_send = self.blob_hashes_to_send[1:]
|
self.blob_hashes_to_send = self.blob_hashes_to_send[1:]
|
||||||
d = self.open_blob_for_reading(blob)
|
d = self.blob_manager.get_blob(blob_hash)
|
||||||
|
d.addCallback(self.open_blob_for_reading)
|
||||||
d.addCallbacks(lambda _: self.send_blob_info(),
|
d.addCallbacks(lambda _: self.send_blob_info(),
|
||||||
lambda err: self.skip_missing_blob(err, blob.blob_hash))
|
lambda err: self.skip_missing_blob(err, blob.blob_hash))
|
||||||
return d
|
return d
|
||||||
|
|
Loading…
Reference in a new issue