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 @@ -684,7 +684,7 @@ def test_del___main__(self):

@support.cpython_only
def test_unknown_options(self):
# Test unknown option -a
# Test unknown option
for option in ('-z', '--long-option', '---'):
with self.subTest(option=option):
rc, out, err = assert_python_failure('-E', option)
Expand Down
4 changes: 2 additions & 2 deletions Python/getopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ _PyOS_GetOpt(struct _PyOS_GetOpt *getopt)
wchar_t *ptr = wcschr(SHORT_OPTS, option);
if (ptr == NULL) {
if (error) {
fprintf(stderr, "Unknown option: -%c\n", (char)option);
fprintf(stderr, "Unknown option: -%lc\n", option);
}
return '_';
}
Expand All @@ -174,7 +174,7 @@ _PyOS_GetOpt(struct _PyOS_GetOpt *getopt)
if (getopt->index >= argc) {
if (error) {
fprintf(stderr,
"Argument expected for the -%c option\n", (char)option);
"Argument expected for the -%lc option\n", option);
}
return '_';
}
Expand Down
Loading