diff Python/getopt.c @ 80566:654a628f5f00 3.2

#16306: report only the first unknown option and add more tests. Patch by Serhiy Storchaka.
author Ezio Melotti <ezio.melotti@gmail.com>
date Fri, 23 Nov 2012 18:48:32 +0200
parents 0153c077a0fd
children
line wrap: on
line diff
--- a/Python/getopt.c	Wed Nov 21 18:36:08 2012 +0200
+++ b/Python/getopt.c	Fri Nov 23 18:48:32 2012 +0200
@@ -45,7 +45,7 @@
 
 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"";