]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
upload.py: make it easier to have an IUploadable that overrides encoding parameters...
authorBrian Warner <warner@lothar.com>
Thu, 17 Jan 2008 08:17:42 +0000 (01:17 -0700)
committerBrian Warner <warner@lothar.com>
Thu, 17 Jan 2008 08:17:42 +0000 (01:17 -0700)
src/allmydata/upload.py

index f07743015145743da0ceda5abb191c5f6d10d292..107d4c643698ddfdd67922f7e588766d86294e5c 100644 (file)
@@ -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