mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 13:07:56 +00:00
All tests pass on Python 3.
This commit is contained in:
parent
5cd00d6f2e
commit
8167a9fda6
@ -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
|
||||
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user