startstop_node.start() already checks that the basedir exists and emits
an error message. The extra check in StartOptions.parseArgs() caused
unit tests to fail (because none of the sample directories tested,
including ~/.tahoe, exist). So I removed the redundant check.
# --nodaemon looks like a basedir. So you can either use 'tahoe
# start' or 'tahoe start BASEDIR --TWISTD-OPTIONS'.
BasedirOptions.parseArgs(self, basedir)
- if not os.path.isdir(self['basedir']):
- raise usage.UsageError("--basedir '%s' doesn't exist" %
- quote_output(self['basedir']))
self.twistd_args = twistd_args
def getSynopsis(self):
o = self.parse(["start"])
self.failUnlessEqual(o["basedir"], os.path.join(os.path.expanduser("~"),
".tahoe"))
- o = self.parse(["start", "here"]) # XXX fails
+ o = self.parse(["start", "here"])
self.failUnlessEqual(o["basedir"], os.path.abspath("here"))
o = self.parse(["start", "--basedir", "there"])
self.failUnlessEqual(o["basedir"], os.path.abspath("there"))