mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +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
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue