diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2012-11-23 16:48:32 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2012-11-23 16:48:32 (GMT) |
commit | a0dd22e5e824195e322cb417ebb34c66475e952d (patch) | |
tree | e956848fbcae719625590663cbef64c6401d124e /Modules | |
parent | 3c76aa6b234fb1496b35488f30cca2fece467354 (diff) | |
download | cpython-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 'Modules')
-rw-r--r-- | Modules/main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/main.c b/Modules/main.c index 5d1d896..17aebae 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -339,6 +339,7 @@ Py_Main(int argc, wchar_t **argv) /* Hash randomization needed early for all string operations (including -W and -X options). */ + _PyOS_opterr = 0; /* prevent printing the error in 1st pass */ while ((c = _PyOS_GetOpt(argc, argv, PROGRAM_OPTS)) != EOF) { if (c == 'm' || c == 'c') { /* -c / -m is the last option: following arguments are |