From 2da3f69f25645ca61871c3bb42d09a93991579dd Mon Sep 17 00:00:00 2001
From: david-sarah <david-sarah@jacaranda.org>
Date: Mon, 1 Aug 2011 15:13:17 -0700
Subject: [PATCH] Address Kevan's comment in #776 about Options classes missed
 when adding 'self.command_name'. refs #776, #1359

---
 src/allmydata/scripts/cli.py            | 2 +-
 src/allmydata/scripts/keygen.py         | 2 +-
 src/allmydata/scripts/stats_gatherer.py | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/allmydata/scripts/cli.py b/src/allmydata/scripts/cli.py
index 0eeb78d9..c4b0fcf1 100644
--- a/src/allmydata/scripts/cli.py
+++ b/src/allmydata/scripts/cli.py
@@ -220,7 +220,7 @@ class CpOptions(VDriveOptions):
         self.destination = argv_to_unicode(args[-1])
 
     def getSynopsis(self):
-        return "Usage: tahoe cp [options] FROM.. TO"
+        return "Usage: %s cp [options] FROM.. TO" % (self.command_name,)
 
     longdesc = """
     Use 'tahoe cp' to copy files between a local filesystem and a Tahoe grid.
diff --git a/src/allmydata/scripts/keygen.py b/src/allmydata/scripts/keygen.py
index cd8e1ce2..1f5c30f5 100644
--- a/src/allmydata/scripts/keygen.py
+++ b/src/allmydata/scripts/keygen.py
@@ -12,7 +12,7 @@ class CreateKeyGeneratorOptions(BasedirMixin, BaseOptions):
     ]
 
     def getSynopsis(self):
-        return "Usage:  %s create-key-generator [options] NODEDIR" % (os.path.basename(sys.argv[0]),)
+        return "Usage:  %s create-key-generator [options] NODEDIR" % (self.command_name,)
 
 
 keygen_tac = """
diff --git a/src/allmydata/scripts/stats_gatherer.py b/src/allmydata/scripts/stats_gatherer.py
index 2a4372c6..230d4a90 100644
--- a/src/allmydata/scripts/stats_gatherer.py
+++ b/src/allmydata/scripts/stats_gatherer.py
@@ -12,7 +12,7 @@ class CreateStatsGathererOptions(BasedirMixin, BaseOptions):
     ]
 
     def getSynopsis(self):
-        return "Usage:  %s create-stats-gatherer [options] NODEDIR" % (os.path.basename(sys.argv[0]),)
+        return "Usage:  %s create-stats-gatherer [options] NODEDIR" % (self.command_name,)
 
 
 stats_gatherer_tac = """
-- 
2.45.2