From: Brian Warner Date: Mon, 13 May 2013 15:57:00 +0000 (-0700) Subject: startstop_node.py: remove redundant --basedir check that failed tests X-Git-Url: https://git.rkrishnan.org/configuration.rst?a=commitdiff_plain;h=15720c4f179bab12d9505da99f5696200f52db13;p=tahoe-lafs%2Ftahoe-lafs.git startstop_node.py: remove redundant --basedir check that failed tests 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. --- diff --git a/src/allmydata/scripts/startstop_node.py b/src/allmydata/scripts/startstop_node.py index 7aa1bf78..5f5b1ea9 100644 --- a/src/allmydata/scripts/startstop_node.py +++ b/src/allmydata/scripts/startstop_node.py @@ -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): diff --git a/src/allmydata/test/test_cli.py b/src/allmydata/test/test_cli.py index f9d61092..e6f1cc6f 100644 --- a/src/allmydata/test/test_cli.py +++ b/src/allmydata/test/test_cli.py @@ -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"))