#16306: report only the first unknown option and add more tests. Patch by Serhiy Storchaka.

This commit is contained in:
Ezio Melotti 2012-11-23 18:46:11 +02:00
parent 0afe4e4fa6
commit ec6486d52d
3 changed files with 17 additions and 6 deletions

View file

@ -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 = "";