From 7910222e257368cd534f5334085f008c36e288c6 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 12 Nov 2009 19:59:08 -0500 Subject: [PATCH] Added the VerbatimHelpFormatter class to the CLI module. --- src/CLI.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/CLI.py b/src/CLI.py index b7fcaaf..4da436e 100644 --- a/src/CLI.py +++ b/src/CLI.py @@ -1,3 +1,4 @@ +from optparse import IndentedHelpFormatter from optparse import OptionParser import Configuration.Defaults @@ -23,3 +24,15 @@ def default_option_parser(usage=None): default=Configuration.Defaults.DATABASE_USERNAME) return parser + + + +class VerbatimHelpFormatter(IndentedHelpFormatter): + """ + The two HelpFormatters supplied with OptParse like to mangle their + descriptions during print_help(). This subclassed formatter + overrides the format_description() method with an implementation + that simply returns the description unmodified. + """ + def format_description(self, description): + return description -- 2.44.2