Skip to content

Commit 78695f5

Browse files
authored
Merge pull request #6376 from dhalbert/errno-messages
Correct errno messages
2 parents a7b6b4e + 58646a9 commit 78695f5

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

locale/circuitpython.pot

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,6 +1749,10 @@ msgstr ""
17491749
msgid "No space left on device"
17501750
msgstr ""
17511751

1752+
#: py/moduerrno.c
1753+
msgid "No such device"
1754+
msgstr ""
1755+
17521756
#: py/moduerrno.c
17531757
msgid "No such file/directory"
17541758
msgstr ""
@@ -1856,6 +1860,10 @@ msgstr ""
18561860
msgid "Only one color can be transparent at a time"
18571861
msgstr ""
18581862

1863+
#: py/moduerrno.c
1864+
msgid "Operation not permitted"
1865+
msgstr ""
1866+
18591867
#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c
18601868
msgid "Operation or feature not supported"
18611869
msgstr ""
@@ -2521,10 +2529,6 @@ msgstr ""
25212529
msgid "Unsupported format"
25222530
msgstr ""
25232531

2524-
#: py/moduerrno.c
2525-
msgid "Unsupported operation"
2526-
msgstr ""
2527-
25282532
#: ports/espressif/common-hal/dualbank/__init__.c
25292533
msgid "Update Failed"
25302534
msgstr ""

py/moduerrno.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ const char *mp_common_errno_to_str(mp_obj_t errno_val, char *buf, size_t len) {
140140
const compressed_string_t *desc = NULL;
141141
switch (MP_OBJ_SMALL_INT_VALUE(errno_val)) {
142142
case EPERM:
143-
desc = MP_ERROR_TEXT("Permission denied");
143+
desc = MP_ERROR_TEXT("Operation not permitted");
144144
break;
145145
case ENOENT:
146146
desc = MP_ERROR_TEXT("No such file/directory");
@@ -155,7 +155,7 @@ const char *mp_common_errno_to_str(mp_obj_t errno_val, char *buf, size_t len) {
155155
desc = MP_ERROR_TEXT("File exists");
156156
break;
157157
case ENODEV:
158-
desc = MP_ERROR_TEXT("Unsupported operation");
158+
desc = MP_ERROR_TEXT("No such device");
159159
break;
160160
case EINVAL:
161161
desc = MP_ERROR_TEXT("Invalid argument");

0 commit comments

Comments
 (0)