All tests pass on Python 3.

This commit is contained in:
Itamar Turner-Trauring 2020-09-24 11:01:35 -04:00
parent 5cd00d6f2e
commit 8167a9fda6
2 changed files with 4 additions and 4 deletions

View File

@ -946,7 +946,7 @@ class MutableFileVersion(object):
"""
c = consumer.MemoryConsumer(progress=progress)
d = self.read(c, fetch_privkey=fetch_privkey)
d.addCallback(lambda mc: "".join(mc.chunks))
d.addCallback(lambda mc: b"".join(mc.chunks))
return d

View File

@ -743,7 +743,7 @@ class Retrieve(object):
block_and_salt, blockhashes, sharehashes = results
block, salt = block_and_salt
_assert(type(block) is str, (block, salt))
_assert(isinstance(block, bytes), (block, salt))
blockhashes = dict(enumerate(blockhashes))
self.log("the reader gave me the following blockhashes: %s" % \
@ -847,7 +847,7 @@ class Retrieve(object):
# d.items()[0] is like (shnum, (block, salt))
# d.items()[0][1] is like (block, salt)
# d.items()[0][1][1] is the salt.
salt = blocks_and_salts.items()[0][1][1]
salt = list(blocks_and_salts.items())[0][1][1]
# Next, extract just the blocks from the dict. We'll use the
# salt in the next step.
share_and_shareids = [(k, v[0]) for k, v in blocks_and_salts.items()]
@ -870,7 +870,7 @@ class Retrieve(object):
else:
d = defer.maybeDeferred(self._segment_decoder.decode, shares, shareids)
def _process(buffers):
segment = "".join(buffers)
segment = b"".join(buffers)
self.log(format="now decoding segment %(segnum)s of %(numsegs)s",
segnum=segnum,
numsegs=self._num_segments,