add human-encodings of caps, refactor encodings of caps, tighten checks, fix unit tests to use values of the right size

This commit is contained in:
Zooko O'Whielacronx
2008-01-03 16:55:43 -07:00
parent 46db7cf1dc
commit eb373c0001
5 changed files with 189 additions and 197 deletions

View File

@ -128,7 +128,9 @@ class Client(node.Node, Referenceable, testutil.PollMixin):
if os.path.exists(privdirfile):
try:
theuri = open(privdirfile, "r").read().strip()
if not uri.is_string_newdirnode_rw(theuri):
try:
uri.NewDirectoryURI.init_from_human_encoding(theuri)
except:
raise EnvironmentError("not a well-formed mutable directory uri")
except EnvironmentError, le:
d = self.when_tub_ready()