summaryrefslogtreecommitdiff
path: root/Python/getopt.c
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-11-23 18:48:32 +0200
committerEzio Melotti <ezio.melotti@gmail.com>2012-11-23 18:48:32 +0200
commit1802937d1c6583c845b347d86db0ce3d6f56545f (patch)
tree2f4c5ac0d93c81b4dd51c3a55adb2f55f71e3ded /Python/getopt.c
parent077f2af9e6c9dd954eb20bbb95dcd433df5c08ff (diff)
downloadcpython-1802937d1c6583c845b347d86db0ce3d6f56545f.tar.gz
#16306: report only the first unknown option and add more tests. Patch by Serhiy Storchaka.
Diffstat (limited to 'Python/getopt.c')
-rw-r--r--Python/getopt.c2
1 files changed, 1 insertions, 1 deletions
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"";