cryptblob write needs bytes on py3
This commit is contained in:
parent
39d7f2e46e
commit
b1c5fe0b4d
1 changed files with 2 additions and 0 deletions
|
@ -128,6 +128,8 @@ class CryptStreamBlobMaker(object):
|
||||||
max bytes are written. num_bytes_to_write is the number
|
max bytes are written. num_bytes_to_write is the number
|
||||||
of bytes that will be written from data in this call
|
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
|
max_bytes_to_write = MAX_BLOB_SIZE - self.length - 1
|
||||||
done = False
|
done = False
|
||||||
if max_bytes_to_write <= len(data):
|
if max_bytes_to_write <= len(data):
|
||||||
|
|
Loading…
Reference in a new issue