summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-11-23 18:46:11 +0200
committerEzio Melotti <ezio.melotti@gmail.com>2012-11-23 18:46:11 +0200
commit4b63040462b100a2f34076b99059d0b3670eb327 (patch)
tree398d06c880be9d531bc4ccf2bfef228d94073b5a /Python
parent7b45958236e7c0c434935e44146f2dcc9ac34f81 (diff)
downloadcpython-4b63040462b100a2f34076b99059d0b3670eb327.tar.gz
#16306: report only the first unknown option and add more tests. Patch by Serhiy Storchaka.
Diffstat (limited to 'Python')
-rw-r--r--Python/getopt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/getopt.c b/Python/getopt.c
index 624da9ad89..af5b03c4f4 100644
--- a/Python/getopt.c
+++ b/Python/getopt.c
@@ -41,7 +41,7 @@ static char *opt_ptr = "";
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 = "";