From 100c18d9b63a73cb0002f3c27e33f12dd2e01e92 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Thu, 7 Sep 2017 12:00:55 -0400 Subject: [PATCH] send CryptBlobInfo (not a CryptStreamBlobMaker) to DiskBlobManager.creator_finished --- lbrynet/cryptstream/CryptStreamCreator.py | 4 ++-- lbrynet/file_manager/EncryptedFileCreator.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lbrynet/cryptstream/CryptStreamCreator.py b/lbrynet/cryptstream/CryptStreamCreator.py index 9a3225f9a..446c29951 100644 --- a/lbrynet/cryptstream/CryptStreamCreator.py +++ b/lbrynet/cryptstream/CryptStreamCreator.py @@ -89,8 +89,8 @@ class CryptStreamCreator(StreamCreator): should_announce = self.blob_count == 0 d = self.current_blob.close() d.addCallback(self._blob_finished) - d.addCallback(lambda _: self.blob_manager.creator_finished( - self.next_blob_creator, should_announce)) + d.addCallback(lambda blob_info: self.blob_manager.creator_finished(blob_info, + should_announce)) self.finished_deferreds.append(d) self.current_blob = None diff --git a/lbrynet/file_manager/EncryptedFileCreator.py b/lbrynet/file_manager/EncryptedFileCreator.py index 67b5702b7..bf6d3bea7 100644 --- a/lbrynet/file_manager/EncryptedFileCreator.py +++ b/lbrynet/file_manager/EncryptedFileCreator.py @@ -29,8 +29,9 @@ class EncryptedFileStreamCreator(CryptStreamCreator): self.blob_infos = [] def _blob_finished(self, blob_info): - log.debug("length: %s", str(blob_info.length)) + log.debug("length: %s", blob_info.length) self.blob_infos.append(blob_info) + return blob_info def _save_stream_info(self): stream_info_manager = self.lbry_file_manager.stream_info_manager