mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 10:01:54 +00:00
interfaces: use explicit TupleOf and ChoiceOf constraints, since the upcoming version of Foolscap changes the meaning of bare tuples (from ChoiceOf to TupleOf)
This commit is contained in:
parent
03fbee6ade
commit
652e8a735f
@ -1,6 +1,7 @@
|
||||
|
||||
from zope.interface import Interface
|
||||
from foolscap.schema import StringConstraint, ListOf, TupleOf, SetOf, DictOf
|
||||
from foolscap.schema import StringConstraint, ListOf, TupleOf, SetOf, DictOf, \
|
||||
ChoiceOf
|
||||
from foolscap import RemoteInterface, Referenceable
|
||||
|
||||
HASH_SIZE=32
|
||||
@ -81,12 +82,12 @@ RIMutableDirectoryNode_ = Any() # TODO: how can we avoid this?
|
||||
class RIMutableDirectoryNode(RemoteInterface):
|
||||
def list():
|
||||
return ListOf( TupleOf(str, # name, relative to directory
|
||||
(RIMutableDirectoryNode_, Verifierid)),
|
||||
ChoiceOf(RIMutableDirectoryNode_, Verifierid)),
|
||||
maxLength=100,
|
||||
)
|
||||
|
||||
def get(name=str):
|
||||
return (RIMutableDirectoryNode_, Verifierid)
|
||||
return ChoiceOf(RIMutableDirectoryNode_, Verifierid)
|
||||
|
||||
def add_directory(name=str):
|
||||
return RIMutableDirectoryNode_
|
||||
|
Loading…
x
Reference in New Issue
Block a user