From b1c5fe0b4dba65d54036a5c43c8b2dcc47160dce Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Thu, 12 Jul 2018 16:36:30 -0300 Subject: [PATCH] cryptblob write needs bytes on py3 --- lbrynet/cryptstream/CryptBlob.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lbrynet/cryptstream/CryptBlob.py b/lbrynet/cryptstream/CryptBlob.py index 89560968c..058508371 100644 --- a/lbrynet/cryptstream/CryptBlob.py +++ b/lbrynet/cryptstream/CryptBlob.py @@ -128,6 +128,8 @@ class CryptStreamBlobMaker(object): max bytes are written. num_bytes_to_write is the number of bytes that will be written from data in this call """ + if not isinstance(data, bytes): + data = data.encode() max_bytes_to_write = MAX_BLOB_SIZE - self.length - 1 done = False if max_bytes_to_write <= len(data):