From 8e51e99c31e01f7db033f1bb19b8910059547089 Mon Sep 17 00:00:00 2001 From: Emile Anclin Date: Tue, 21 Sep 2010 15:44:02 +0200 Subject: [py3k] can't compare None to int with python3 --- optik_ext.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'optik_ext.py') diff --git a/optik_ext.py b/optik_ext.py index 44d0504..38a3b33 100644 --- a/optik_ext.py +++ b/optik_ext.py @@ -272,9 +272,10 @@ OptionGroup.level = 0 def format_option_help(self, formatter): result = [] - outputlevel = getattr(formatter, 'output_level', 0) + outputlevel = getattr(formatter, 'output_level', 0) or 0 for option in self.option_list: - if getattr(option, 'level', 0) <= outputlevel and not option.help is SUPPRESS_HELP: + if (getattr(option, 'level', 0) or 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 -- cgit v1.2.1