mirror of
https://github.com/python/cpython
synced 2024-10-14 20:45:19 +00:00
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.
This commit is contained in:
parent
83e879d99f
commit
0189266456
|
@ -39,7 +39,7 @@
|
|||
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)
|
||||
|
|
Loading…
Reference in a new issue