Skip to content

Commit dc46cf1

Browse files
AJMansfielddpgeorge
authored andcommitted
tools/mpremote: Fix possibly-missing EOPNOTSUPP errno name.
Signed-off-by: Anson Mansfield <[email protected]>
1 parent 805fe08 commit dc46cf1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/mpremote/mpremote/transport.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ def __init__(self, status_code, error_output):
5656
# raises it as the corresponding OSError-derived exception.
5757
def _convert_filesystem_error(e, info):
5858
if "OSError" in e.error_output:
59-
for code, estr in errno.errorcode.items():
59+
for code, estr in [
60+
*errno.errorcode.items(),
61+
(errno.EOPNOTSUPP, "EOPNOTSUPP"),
62+
]:
6063
if estr in e.error_output:
6164
return OSError(code, info)
6265
return e

0 commit comments

Comments
 (0)