summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-11-23 16:46:11 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2012-11-23 16:46:11 (GMT)
commitec6486d52d89cea1362697dd0d92e127c188d298 (patch)
treed90ba79332f504ea7997f176a723a707af6936ce /Python
parent0afe4e4fa6df2acc46de6e826de06b9f343de7f1 (diff)
downloadcpython-ec6486d52d89cea1362697dd0d92e127c188d298.zip
cpython-ec6486d52d89cea1362697dd0d92e127c188d298.tar.gz
cpython-ec6486d52d89cea1362697dd0d92e127c188d298.tar.bz2
#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 624da9a..af5b03c 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 = "";