summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2008-06-21 14:49:33 +0200
committerHans Ulrich Niedermann <hun@n-dimensional.de>2008-06-21 14:49:33 +0200
commit8efb167fd666beaf19f78a24e3f49bec9700ab3f (patch)
tree0fcd2f64d639b07b852cd68b179223fb485b5ae8
parent56e237fae61ac215278d385b40bae576ae6a919a (diff)
Fix --help output
-rw-r--r--nbb/nbb_lib.in14
1 files changed, 9 insertions, 5 deletions
diff --git a/nbb/nbb_lib.in b/nbb/nbb_lib.in
index 5f5200b..25cc826 100644
--- a/nbb/nbb_lib.in
+++ b/nbb/nbb_lib.in
@@ -520,10 +520,13 @@ class NBB_Command(object):
########################################################################
+outdict = {}
+outdict['vcssystems'] = ", ".join([ x.vcs_name for x in VCSourceTree.plugins ])
+outdict['buildsystems'] = ", ".join([ x.bs_name for x in BSSourceTree.plugins ])
+
+
def print_help():
- vcssystems = ", ".join([ x.vcs_name for x in VCSourceTree.plugins ])
- buildsystems = ", ".join([ x.bs_name for x in BSSourceTree.plugins ])
- print __doc__ % locals()
+ print __doc__ % outdict
def main(argv):
@@ -532,9 +535,10 @@ def main(argv):
idx = prog.rfind('/')
if idx >= 0:
prog = prog[idx+1:]
+ outdict['prog'] = prog
if len(argv) < 2:
- print "Fatal: %(prog)s requires some arguments" % locals()
+ print "Fatal: %(prog)s requires some arguments" % outdict
return 2
verbosity = 0
@@ -546,7 +550,7 @@ def main(argv):
print_help()
return
elif argv[i] in ('-V', '--version'):
- print "%(prog)s (@PACKAGE_NAME@) @PACKAGE_VERSION@" % locals()
+ print "%(prog)s (@PACKAGE_NAME@) @PACKAGE_VERSION@" % outdict
return
elif argv[i] in ('-v', '--verbose'):
verbosity = verbosity + 1