diff --git a/lib/cli.py b/lib/cli.py index 5e75da6d24ad0f86dd1b91750952f8f7f833b1cb..99031920fac28587cd9487355fd9715f31f2aee9 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -251,16 +251,15 @@ def _ParseArgs(argv, commands, aliases): "\n%(bin)s <command> --help to see details, or" " man %(bin)s\n" % {"bin": binary}) # compute the max line length for cmd + usage - mlen = max([len(" %s %s" % (cmd, commands[cmd][3])) for cmd in commands]) + mlen = max([len(" %s" % cmd) for cmd in commands]) mlen = min(60, mlen) # should not get here... # and format a nice command list print "Commands:" for cmd in sortedcmds: - cmdstr = " %s %s" % (cmd, commands[cmd][3]) + cmdstr = " %s" % (cmd,) help_text = commands[cmd][4] help_lines = textwrap.wrap(help_text, 79-3-mlen) - print "%-*s - %s" % (mlen, cmdstr, - help_lines.pop(0)) + print "%-*s - %s" % (mlen, cmdstr, help_lines.pop(0)) for line in help_lines: print "%-*s %s" % (mlen, "", line) print