# HG changeset patch # User Alexandre Fayolle # Date 1272881529 -7200 # Node ID d706bd7eabcf96adbbbd082816bf1f4cfcf3de77 # Parent b3091f908cae55c1305db6b77dbce4c7f6bd33d5 fix help generation for normal optparse using script if optik_ext has been imported (#24450) diff -r b3091f908cae -r d706bd7eabcf optik_ext.py --- a/optik_ext.py Mon May 03 09:15:57 2010 +0200 +++ b/optik_ext.py Mon May 03 12:12:09 2010 +0200 @@ -274,7 +274,7 @@ result = [] outputlevel = getattr(formatter, 'output_level', 0) for option in self.option_list: - if option.level <= outputlevel and not option.help is SUPPRESS_HELP: + if getattr(option, 'level', 0) <= outputlevel and not option.help is SUPPRESS_HELP: result.append(formatter.format_option(option)) return "".join(result) OptionContainer.format_option_help = format_option_help