From 01892664561cab9ff9ae62c4595137d22c39ac6c Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 6 Feb 2003 19:52:56 +0000 Subject: [PATCH] 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. --- Lib/getopt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/getopt.py b/Lib/getopt.py index 4285cbb284..04e881ec73 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) -- 2.50.1