summaryrefslogtreecommitdiff
path: root/clcommands.py
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2010-09-06 13:59:42 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2010-09-06 13:59:42 +0200
commit20a7af02bbd4a519b2471ab9815da31092798f34 (patch)
treecf532d46171b1bde89227274b6a372c275a39867 /clcommands.py
parentc5fd2dbb09c3ca7e1d5fe48e46f01f181cdcade3 (diff)
downloadlogilab-common-20a7af02bbd4a519b2471ab9815da31092798f34.tar.gz
[clcommands] nicer that way + fix indent error in help message
Diffstat (limited to 'clcommands.py')
-rw-r--r--clcommands.py9
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()):