diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-08-30 18:34:47 +0200 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-08-30 18:34:47 +0200 |
commit | 7a18d21230b4efb203a9a2ce9972962a2bf8fe04 (patch) | |
tree | 5da9e95f1017ac0a670988863c384e279f1c63e1 /Python/pyarena.c | |
parent | 9e1599ad48ab948af2f2907ace8b5bcd8ccfd3b2 (diff) | |
download | cpython-git-7a18d21230b4efb203a9a2ce9972962a2bf8fe04.tar.gz |
Remove misleading comment and code.
Windows does set the errno attribute to ENOENT, but the error message
displays the Windows error number (3 -> ERROR_PATH_NOT_FOUND), not the
errno number (2 -> ENOENT).
The Unix errno corresponding to 3 is ESRCH, explaining the confusion,
which can be seen in the following snippet:
>>> shutil.rmtree("foo")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "Z:\default\lib\shutil.py", line 272, in rmtree
onerror(os.listdir, path, sys.exc_info())
File "Z:\default\lib\shutil.py", line 270, in rmtree
names = os.listdir(path)
WindowsError: [Error 3] The system cannot find the path specified:
'foo\\*.*'
>>> e = sys.last_value
>>> e.errno
2
>>> e.winerror
3
>>> errno.errorcode[2]
'ENOENT'
For reference, see PC/errmap.h and
http://msdn.microsoft.com/en-us/library/ms681382%28v=vs.85%29.aspx
Diffstat (limited to 'Python/pyarena.c')
0 files changed, 0 insertions, 0 deletions