commit | 01892664561cab9ff9ae62c4595137d22c39ac6c | [log] [tgz] |
---|---|---|
author | Andrew M. Kuchling <amk@amk.ca> | Thu Feb 06 19:52:56 2003 +0000 |
committer | Andrew M. Kuchling <amk@amk.ca> | Thu Feb 06 19:52:56 2003 +0000 |
tree | cc1e69eb092b8513aea5bb2c79e0a89768ba353d | |
parent | 83e879d99fc855dfca597d222b4c5a372d1611eb [diff] |
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 4285cbb..04e881e 100644 --- a/Lib/getopt.py +++ b/Lib/getopt.py
@@ -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)