diff options
author | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2010-09-06 13:59:42 +0200 |
---|---|---|
committer | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2010-09-06 13:59:42 +0200 |
commit | 20a7af02bbd4a519b2471ab9815da31092798f34 (patch) | |
tree | cf532d46171b1bde89227274b6a372c275a39867 | |
parent | c5fd2dbb09c3ca7e1d5fe48e46f01f181cdcade3 (diff) | |
download | logilab-common-20a7af02bbd4a519b2471ab9815da31092798f34.tar.gz |
[clcommands] nicer that way + fix indent error in help message
-rw-r--r-- | clcommands.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/clcommands.py b/clcommands.py index e683ccf..22b5162 100644 --- a/clcommands.py +++ b/clcommands.py @@ -155,11 +155,10 @@ class CommandLine(dict): print '[--rc-file=<configuration file>]', print '<command> [options] <command argument>...' if self.doc: - print '\n%s\n' % self.doc - else: - print - print '''Type "%(pgm)s <command> --help" for more information about a specific - command. Available commands are :\n''' % self.__dict__ + print '\n%s' % self.doc + print ''' +Type "%(pgm)s <command> --help" for more information about a specific +command. Available commands are :\n''' % self.__dict__ max_len = max([len(cmd) for cmd in self]) padding = ' ' * max_len for cmdname, cmd in sorted(self.items()): |