From: Brian Warner <warner@lothar.com>
Date: Sat, 14 Apr 2007 02:04:38 +0000 (-0700)
Subject: interfaces: use explicit TupleOf and ChoiceOf constraints, since the upcoming version... 
X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~104
X-Git-Url: https://git.rkrishnan.org/specifications/%5B/statistics?a=commitdiff_plain;h=652e8a735f718fc8983084844cd53164cac21dfb;p=tahoe-lafs%2Ftahoe-lafs.git

interfaces: use explicit TupleOf and ChoiceOf constraints, since the upcoming version of Foolscap changes the meaning of bare tuples (from ChoiceOf to TupleOf)
---

diff --git a/src/allmydata/interfaces.py b/src/allmydata/interfaces.py
index 099a79e7..f724ccd5 100644
--- a/src/allmydata/interfaces.py
+++ b/src/allmydata/interfaces.py
@@ -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_