]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
runner.py: allow all directory-using commands (create/start/stop) to accept argv...
authorBrian Warner <warner@allmydata.com>
Wed, 6 Jun 2007 18:37:19 +0000 (11:37 -0700)
committerBrian Warner <warner@allmydata.com>
Wed, 6 Jun 2007 18:37:19 +0000 (11:37 -0700)
src/allmydata/scripts/runner.py

index 6b7af83055516281483e62a63836e53fd763aee6..c00757dc9838871f338dfc979e4c98fc645aab76 100644 (file)
@@ -48,6 +48,12 @@ class BasedirMixin:
             raise usage.UsageError("<basedir> parameter is required")
         self['basedir'] = os.path.abspath(os.path.expanduser(self['basedir']))
 
+    def parseArgs(self, *args):
+        if len(args) > 0:
+            self['basedir'] = args[0]
+        if len(args) > 1:
+            raise usage.UsageError("I wasn't expecting so many arguments")
+
 class StartOptions(BasedirMixin, usage.Options):
     optParameters = [
         ["basedir", "C", ".", "which directory to start the node in"],
@@ -85,12 +91,6 @@ class CreateIntroducerOptions(BasedirMixin, usage.Options):
         ["quiet", "q", "operate silently"],
         ]
 
-    def parseArgs(self, *args):
-        if len(args) > 0:
-            self['basedir'] = args[0]
-        if len(args) > 1:
-            raise usage.UsageError("I wasn't expecting so many arguments")
-
 client_tac = """
 # -*- python -*-