mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 13:33:09 +00:00
This should be bytes, as it's encoded as URI extension which still expects bytes.
This commit is contained in:
parent
6726c6ec5b
commit
37ca3c5181
@ -22,7 +22,7 @@ import zfec
|
||||
|
||||
@implementer(ICodecEncoder)
|
||||
class CRSEncoder(object):
|
||||
ENCODER_TYPE = "crs"
|
||||
ENCODER_TYPE = b"crs"
|
||||
|
||||
def set_params(self, data_size, required_shares, max_shares):
|
||||
assert required_shares <= max_shares
|
||||
@ -40,8 +40,8 @@ class CRSEncoder(object):
|
||||
return (self.data_size, self.required_shares, self.max_shares)
|
||||
|
||||
def get_serialized_params(self):
|
||||
return native_str("%d-%d-%d" % (self.data_size, self.required_shares,
|
||||
self.max_shares))
|
||||
return b"%d-%d-%d" % (self.data_size, self.required_shares,
|
||||
self.max_shares)
|
||||
|
||||
def get_block_size(self):
|
||||
return self.share_size
|
||||
@ -84,5 +84,5 @@ class CRSDecoder(object):
|
||||
return defer.succeed(data)
|
||||
|
||||
def parse_params(serializedparams):
|
||||
pieces = serializedparams.split("-")
|
||||
pieces = serializedparams.split(b"-")
|
||||
return int(pieces[0]), int(pieces[1]), int(pieces[2])
|
||||
|
Loading…
Reference in New Issue
Block a user