Issue #12802: the Windows error ERROR_DIRECTORY (numbered 267) is now · pythoncapi/cpython@a762285 · GitHub
Skip to content

Commit a762285

Browse files
committed
Issue python#12802: the Windows error ERROR_DIRECTORY (numbered 267) is now
mapped to POSIX errno ENOTDIR (previously EINVAL).
1 parent 222b208 commit a762285

4 files changed

Lines changed: 27 additions & 6 deletions

File tree

Lib/test/test_exceptions.py

Lines changed: 8 additions & 0 deletions

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ What's New in Python 3.2.3?
1010
Core and Builtins
1111
-----------------
1212

13+
- Issue #12802: the Windows error ERROR_DIRECTORY (numbered 267) is now
14+
mapped to POSIX errno ENOTDIR (previously EINVAL).
15+
1316
- Accept bytes for the AST string type. This is temporary until a proper fix in
1417
3.3.
1518

PC/errmap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ int winerror_to_errno(int winerror)
7272
case 202: return 8;
7373
case 206: return 2;
7474
case 215: return 11;
75+
case 267: return 20;
7576
case 1816: return 12;
7677
default: return EINVAL;
7778
}

PC/generrmap.c

Lines changed: 15 additions & 6 deletions

0 commit comments

Comments
 (0)