From: Andrew M. Kuchling Date: Sun, 21 Mar 2004 19:28:48 +0000 (+0000) Subject: [Patch #900071] Be case-insensitive when removing 'usage:' string X-Git-Tag: v2.4a1~629 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=56d7913baebe520015c4d25dd1a7469cfd918527;p=thirdparty%2FPython%2Fcpython.git [Patch #900071] Be case-insensitive when removing 'usage:' string --- diff --git a/Lib/optparse.py b/Lib/optparse.py index b89a6ce7dfb8..bacef0f311bb 100644 --- a/Lib/optparse.py +++ b/Lib/optparse.py @@ -1033,7 +1033,7 @@ class OptionParser (OptionContainer): self.usage = "%prog [options]" elif usage is SUPPRESS_USAGE: self.usage = None - elif usage.startswith("usage: "): + elif usage.lower().startswith("usage: "): # for backwards compatibility with Optik 1.3 and earlier self.usage = usage[7:] else: