]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
startstop_node.py: remove redundant --basedir check that failed tests
authorBrian Warner <warner@lothar.com>
Mon, 13 May 2013 15:57:00 +0000 (08:57 -0700)
committerDaira Hopwood <daira@jacaranda.org>
Tue, 14 Oct 2014 17:12:20 +0000 (18:12 +0100)
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.

src/allmydata/scripts/startstop_node.py
src/allmydata/test/test_cli.py

index 7aa1bf785d595301a054bb8c6deb3182d3e63785..5f5b1ea9e8b26a7fb705b83ca102b26b3d6a9ee3 100644 (file)
@@ -18,9 +18,6 @@ class StartOptions(BasedirOptions):
         # --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):
index f9d6109258bec69b925d167946d342330b65874a..e6f1cc6f3fd4f0ee0184493cf354f0d185918793 100644 (file)
@@ -3862,7 +3862,7 @@ class Options(unittest.TestCase):
         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"))