From 2346d8621d55e69da6e018468cf521eb57b451cf Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Wed, 18 Feb 2009 13:29:03 -0700 Subject: [PATCH] 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 --- src/allmydata/interfaces.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) -- 2.37.2