From daa4c3238185f678673a164066c5f893af590061 Mon Sep 17 00:00:00 2001
From: Brian Warner <warner@allmydata.com>
Date: Wed, 6 Jun 2007 11:37:19 -0700
Subject: [PATCH] runner.py: allow all directory-using commands
 (create/start/stop) to accept argv[-1] as well as --basedir

---
 src/allmydata/scripts/runner.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/allmydata/scripts/runner.py b/src/allmydata/scripts/runner.py
index 6b7af830..c00757dc 100644
--- a/src/allmydata/scripts/runner.py
+++ b/src/allmydata/scripts/runner.py
@@ -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 -*-
 
-- 
2.45.2