From: Andrew M. Kuchling Date: Thu, 6 Feb 2003 19:52:56 +0000 (+0000) Subject: A few naughty external scripts do 'raise getopt.error, "blah"', and X-Git-Tag: v2.3c1~1990 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=01892664561cab9ff9ae62c4595137d22c39ac6c;p=thirdparty%2FPython%2Fcpython.git A few naughty external scripts do 'raise getopt.error, "blah"', and now crash because two arguments are expected. Add a default value to keep those scripts running. --- diff --git a/Lib/getopt.py b/Lib/getopt.py index 4285cbb284bb..04e881ec73d0 100644 --- a/Lib/getopt.py +++ b/Lib/getopt.py @@ -39,7 +39,7 @@ import os class GetoptError(Exception): opt = '' msg = '' - def __init__(self, msg, opt): + def __init__(self, msg, opt=''): self.msg = msg self.opt = opt Exception.__init__(self, msg, opt)