Skip to content

Commit 0189266

Browse files
committed
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.
1 parent 83e879d commit 0189266

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/getopt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
class GetoptError(Exception):
4040
opt = ''
4141
msg = ''
42-
def __init__(self, msg, opt):
42+
def __init__(self, msg, opt=''):
4343
self.msg = msg
4444
self.opt = opt
4545
Exception.__init__(self, msg, opt)

0 commit comments

Comments
 (0)