From 15720c4f179bab12d9505da99f5696200f52db13 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Mon, 13 May 2013 08:57:00 -0700 Subject: [PATCH] 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. --- src/allmydata/scripts/startstop_node.py | 3 --- src/allmydata/test/test_cli.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) 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")) -- 2.45.2