mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
#16306: report only the first unknown option and add more tests. Patch by Serhiy Storchaka.
This commit is contained in:
parent
3c76aa6b23
commit
a0dd22e5e8
3 changed files with 17 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue