summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-03-16 23:26:35 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-03-16 23:26:35 +0000
commit69d2e442b110750e432d3f9f3f0de85318ecf967 (patch)
treed56aeadbed446fbbc7b75b1dba374bed283fa6d3 /src
parent9cb2c10c25ddb5e50a0be7734419db788cf723ce (diff)
downloadbcfg2-69d2e442b110750e432d3f9f3f0de85318ecf967.tar.gz
bcfg2-69d2e442b110750e432d3f9f3f0de85318ecf967.tar.bz2
bcfg2-69d2e442b110750e432d3f9f3f0de85318ecf967.zip
Fix help display for long options
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4421 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Options.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/Options.py b/src/lib/Options.py
index 7d0ed557c..83c55b96f 100644
--- a/src/lib/Options.py
+++ b/src/lib/Options.py
@@ -54,9 +54,15 @@ class Option(object):
def buildHelpMessage(self):
msg = ''
if self.cmd:
- msg = self.cmd.ljust(3)
+ if not self.long:
+ msg = self.cmd.ljust(3)
+ else:
+ msg = self.cmd
if self.odesc:
- msg += '%-24s' % (self.odesc)
+ if self.long:
+ msg = "%-27s" % ("%s=%s" % (self.cmd, self.odesc))
+ else:
+ msg += '%-24s' % (self.odesc)
else:
msg += '%-24s' % ('')
msg += "%s\n" % self.desc