man pages: Bugfixed man pages for --sign and --ack flags; e.g., for stg-new
authorGustav Hållberg <gustav@virtutech.com>
Mon, 29 Dec 2008 14:32:58 +0000 (15:32 +0100)
committerKarl Hasselström <kha@treskal.com>
Mon, 29 Dec 2008 14:32:58 +0000 (15:32 +0100)
An optparse argument type 'callback' with a 'dest' setting showed as
"--sign SIGN". Use optparse's Option.takes_value() instead.

Signed-off-by: Gustav Hållberg <gustav@virtutech.com>
Signed-off-by: Karl Hasselström <kha@treskal.com>
stgit/argparse.py

index 0a5f66a..418a506 100644 (file)
@@ -37,7 +37,7 @@ class opt(object):
         return optparse.make_option(*self.pargs, **kwargs)
     def metavar(self):
         o = self.get_option()
-        if not o.nargs:
+        if not o.takes_value():
             return None
         if o.metavar:
             return o.metavar