From: Brian Warner Date: Wed, 18 Feb 2009 20:29:03 +0000 (-0700) Subject: interfaces.py: allow add/renew/cancel-lease to return Any, so that 1.3.1 clients... X-Git-Tag: allmydata-tahoe-1.4.0~196 X-Git-Url: https://git.rkrishnan.org/pf/content/COPYING.TGPPL.html?a=commitdiff_plain;h=2346d8621d55e69da6e018468cf521eb57b451cf;p=tahoe-lafs%2Ftahoe-lafs.git interfaces.py: allow add/renew/cancel-lease to return Any, so that 1.3.1 clients (the first to use these calls) can tolerate future storage servers which might return something other than None --- diff --git a/src/allmydata/interfaces.py b/src/allmydata/interfaces.py index d166f75a..c8211c48 100644 --- a/src/allmydata/interfaces.py +++ b/src/allmydata/interfaces.py @@ -127,7 +127,7 @@ class RIStorageServer(RemoteInterface): tahoe-1.3.0 and earlier, IndexError was raised if there was no bucket) """ - return None + return Any() # returns None now, but future versions might change def renew_lease(storage_index=StorageIndex, renew_secret=LeaseRenewSecret): """ @@ -141,7 +141,7 @@ class RIStorageServer(RemoteInterface): can be renewed or cancelled. For immutable shares, IndexError (without the note) will be raised. """ - return None + return Any() def cancel_lease(storage_index=StorageIndex, cancel_secret=LeaseCancelSecret): @@ -156,7 +156,7 @@ class RIStorageServer(RemoteInterface): can be renewed or cancelled. For immutable shares, IndexError (without the note) will be raised. """ - return None + return Any() def get_buckets(storage_index=StorageIndex): return DictOf(int, RIBucketReader, maxKeys=MAX_BUCKETS)