summaryrefslogtreecommitdiff
path: root/optik_ext.py
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2010-05-25 10:19:30 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2010-05-25 10:19:30 +0200
commit3d9db7d8d5ba6749848e80dd72947e120835aafd (patch)
treea230486ff8f60ac28fb83dbc22337bbe6645e296 /optik_ext.py
parentef7df8b092cc848430f6ba0627e51d9e05a0929d (diff)
downloadlogilab-common-3d9db7d8d5ba6749848e80dd72947e120835aafd.tar.gz
[configuration] handle level for man page generation
Diffstat (limited to 'optik_ext.py')
-rw-r--r--optik_ext.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/optik_ext.py b/optik_ext.py
index 94a0f35..3245db0 100644
--- a/optik_ext.py
+++ b/optik_ext.py
@@ -370,9 +370,10 @@ Please report bugs on the project\'s mailing list:
pkginfo.mailinglist, pkginfo.author, pkginfo.author_email)
-def generate_manpage(optparser, pkginfo, section=1, stream=sys.stdout):
+def generate_manpage(optparser, pkginfo, section=1, stream=sys.stdout, level=0):
"""generate a man page from an optik parser"""
formatter = ManHelpFormatter()
+ formatter.output_level = level
formatter.parser = optparser
print >> stream, formatter.format_head(optparser, pkginfo, section)
print >> stream, optparser.format_option_help(formatter)