From a0dd22e5e824195e322cb417ebb34c66475e952d Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Fri, 23 Nov 2012 18:48:32 +0200 Subject: #16306: report only the first unknown option and add more tests. Patch by Serhiy Storchaka. --- Python/getopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/getopt.c') diff --git a/Python/getopt.c b/Python/getopt.c index 037aa5db51..5cf4cbd7bb 100644 --- a/Python/getopt.c +++ b/Python/getopt.c @@ -45,7 +45,7 @@ static wchar_t *opt_ptr = L""; void _PyOS_ResetGetOpt(void) { - _PyOS_opterr = 0; /* prevent printing the error in 2nd loop in main.c */ + _PyOS_opterr = 1; _PyOS_optind = 1; _PyOS_optarg = NULL; opt_ptr = L""; -- cgit v1.2.1