diff Lib/optparse.py @ 31745:8bf163d06d29 legacy-trunk

[Patch #900071] Be case-insensitive when removing 'usage:' string
author Andrew M. Kuchling <amk@amk.ca>
date Sun, 21 Mar 2004 19:28:48 +0000
parents 8f47281fea7b
children 0d8ee28bf6f0
line wrap: on
line diff
--- a/Lib/optparse.py	Sun Mar 21 19:26:00 2004 +0000
+++ b/Lib/optparse.py	Sun Mar 21 19:28:48 2004 +0000
@@ -1033,7 +1033,7 @@
             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: