mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-08 19:34:18 +00:00
preserve the type when renewing HashedLeaseInfo
does this mean immutable lease renewal is untested? maybe
This commit is contained in:
parent
5d703d9893
commit
3de9c73b0b
@ -287,6 +287,13 @@ class HashedLeaseInfo(proxyForInterface(ILeaseInfo, "_lease_info")): # type: ign
|
||||
_lease_info = attr.ib()
|
||||
_hash = attr.ib()
|
||||
|
||||
def renew(self, new_expire_time):
|
||||
# Preserve the HashedLeaseInfo wrapper around the renewed LeaseInfo.
|
||||
return attr.assoc(
|
||||
self,
|
||||
_lease_info=super(HashedLeaseInfo, self).renew(new_expire_time),
|
||||
)
|
||||
|
||||
def is_renew_secret(self, candidate_secret):
|
||||
# type: (bytes) -> bool
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user