]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blobdiff - src/allmydata/scripts/stats_gatherer.py
CLI: put "[global-opts]" in all command synopses
[tahoe-lafs/tahoe-lafs.git] / src / allmydata / scripts / stats_gatherer.py
index 0764bfc5e8905b6aae4261fb7646ddf04b148fee..7762b2c50236a4e535bfea09fca89218568b2845 100644 (file)
@@ -1,15 +1,14 @@
 
 import os, sys
-from allmydata.scripts.common import BasedirMixin, BaseOptions
+from allmydata.scripts.common import BasedirOptions
 from allmydata.util.assertutil import precondition
 from allmydata.util.encodingutil import listdir_unicode, quote_output
 
-class CreateStatsGathererOptions(BasedirMixin, BaseOptions):
+class CreateStatsGathererOptions(BasedirOptions):
     default_nodedir = None
 
-    optParameters = [
-        ["node-directory", "d", None, "Specify which directory the stats-gatherer should be created in. [no default]"],
-    ]
+    def getSynopsis(self):
+        return "Usage:  %s [global-opts] create-stats-gatherer [options] NODEDIR" % (self.command_name,)
 
 
 stats_gatherer_tac = """
@@ -26,7 +25,8 @@ g.setServiceParent(application)
 """
 
 
-def create_stats_gatherer(basedir, config, out=sys.stdout, err=sys.stderr):
+def create_stats_gatherer(config, out=sys.stdout, err=sys.stderr):
+    basedir = config['basedir']
     # This should always be called with an absolute Unicode basedir.
     precondition(isinstance(basedir, unicode), basedir)