mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Make the Python CLI error message style more consistent (GH-128129)
This commit is contained in:
parent
553cdc6d68
commit
3a570c6d58
2 changed files with 3 additions and 3 deletions
|
@ -102,7 +102,7 @@ int _PyOS_GetOpt(Py_ssize_t argc, wchar_t * const *argv, int *longindex)
|
|||
// Parse long option.
|
||||
if (*opt_ptr == L'\0') {
|
||||
if (_PyOS_opterr) {
|
||||
fprintf(stderr, "expected long option\n");
|
||||
fprintf(stderr, "Expected long option\n");
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ int _PyOS_GetOpt(Py_ssize_t argc, wchar_t * const *argv, int *longindex)
|
|||
}
|
||||
if (!opt->name) {
|
||||
if (_PyOS_opterr) {
|
||||
fprintf(stderr, "unknown option %ls\n", argv[_PyOS_optind - 1]);
|
||||
fprintf(stderr, "Unknown option: %ls\n", argv[_PyOS_optind - 1]);
|
||||
}
|
||||
return '_';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue