summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-11-23 16:48:32 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2012-11-23 16:48:32 (GMT)
commita0dd22e5e824195e322cb417ebb34c66475e952d (patch)
treee956848fbcae719625590663cbef64c6401d124e /Python
parent3c76aa6b234fb1496b35488f30cca2fece467354 (diff)
downloadcpython-a0dd22e5e824195e322cb417ebb34c66475e952d.zip
cpython-a0dd22e5e824195e322cb417ebb34c66475e952d.tar.gz
cpython-a0dd22e5e824195e322cb417ebb34c66475e952d.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 037aa5d..5cf4cbd 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"";