Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/test/test_cmd_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ def test_parsing_error(self):
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True)
err_msg = "unknown option --unknown-option\nusage: "
err_msg = "Unknown option: --unknown-option\nusage: "
self.assertTrue(proc.stderr.startswith(err_msg), proc.stderr)
self.assertNotEqual(proc.returncode, 0)

Expand Down
4 changes: 2 additions & 2 deletions Python/getopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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 '_';
}
Expand Down
Loading