diff Python/getopt.c @ 80565:6a79e3beb854 2.7

#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:46:11 +0200
parents d2df83d7c649
children
line wrap: on
line diff
--- a/Python/getopt.c	Thu Nov 22 23:56:51 2012 +0100
+++ b/Python/getopt.c	Fri Nov 23 18:46:11 2012 +0200
@@ -41,7 +41,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 = "";