mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 13:33:09 +00:00
upload.py: make it easier to have an IUploadable that overrides encoding parameters: just set an attribute instead of subclassing
This commit is contained in:
parent
812383a369
commit
6b08c28f5d
@ -787,10 +787,12 @@ class AssistedUploader:
|
||||
return u.to_string()
|
||||
|
||||
class NoParameterPreferencesMixin:
|
||||
max_segment_size = None
|
||||
encoding_parameters = None
|
||||
def get_maximum_segment_size(self):
|
||||
return defer.succeed(None)
|
||||
return defer.succeed(self.max_segment_size)
|
||||
def get_encoding_parameters(self):
|
||||
return defer.succeed(None)
|
||||
return defer.succeed(self.encoding_parameters)
|
||||
|
||||
class ConvergentUploadMixin:
|
||||
# to use this, the class it is mixed in to must have a seekable
|
||||
|
Loading…
Reference in New Issue
Block a user