mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-20 03:36:25 +00:00
Tests pass on Python 3.
This commit is contained in:
parent
050388ee12
commit
c3bb367a93
@ -127,7 +127,7 @@ class ValidatedExtendedURIProxy(object):
|
||||
# consistent: codec_name, codec_params, tail_codec_params,
|
||||
# num_segments, size, needed_shares, total_shares
|
||||
if 'codec_name' in d:
|
||||
if d['codec_name'] != "crs":
|
||||
if d['codec_name'] != b"crs":
|
||||
raise UnsupportedErasureCodec(d['codec_name'])
|
||||
|
||||
if 'codec_params' in d:
|
||||
|
@ -1,4 +1,5 @@
|
||||
from six.moves import cStringIO as StringIO
|
||||
from io import BytesIO
|
||||
|
||||
from zope.interface import implementer
|
||||
from twisted.internet import defer
|
||||
from twisted.internet.interfaces import IPushProducer
|
||||
@ -104,7 +105,7 @@ class LiteralFileNode(_ImmutableFileNodeBase):
|
||||
# vfs.adapters.ftp._FileToConsumerAdapter), neither of which is
|
||||
# likely to be used as the target for a Tahoe download.
|
||||
|
||||
d = basic.FileSender().beginFileTransfer(StringIO(data), consumer)
|
||||
d = basic.FileSender().beginFileTransfer(BytesIO(data), consumer)
|
||||
d.addCallback(lambda lastSent: consumer)
|
||||
return d
|
||||
|
||||
|
@ -1377,7 +1377,7 @@ class LiteralUploader(object):
|
||||
self._progress.set_progress_total(size)
|
||||
return read_this_many_bytes(uploadable, size)
|
||||
d.addCallback(_got_size)
|
||||
d.addCallback(lambda data: uri.LiteralFileURI("".join(data)))
|
||||
d.addCallback(lambda data: uri.LiteralFileURI(b"".join(data)))
|
||||
d.addCallback(lambda u: u.to_string())
|
||||
d.addCallback(self._build_results)
|
||||
return d
|
||||
|
Loading…
Reference in New Issue
Block a user