Mercurial > hg-stable
changeset 25645:977102cb12fc
osutil: remove Python 2.4 errno conversion workaround
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 22 Jun 2015 10:11:31 -0700 |
parents | c99f9715cc9a |
children | 57e7a060a06f |
files | mercurial/pure/osutil.py |
diffstat | 1 files changed, 1 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/pure/osutil.py Mon Jun 22 10:09:08 2015 -0700 +++ b/mercurial/pure/osutil.py Mon Jun 22 10:11:31 2015 -0700 @@ -59,7 +59,6 @@ posixfile = open else: import ctypes, msvcrt - from errno import ESRCH, ENOENT _kernel32 = ctypes.windll.kernel32 @@ -99,14 +98,7 @@ def _raiseioerror(name): err = ctypes.WinError() - # For python 2.4, treat ESRCH as ENOENT like WindowsError does - # in python 2.5 or later. - # py24: WindowsError(3, '').errno => 3 - # py25 or later: WindowsError(3, '').errno => 2 - errno = err.errno - if errno == ESRCH: - errno = ENOENT - raise IOError(errno, '%s: %s' % (name, err.strerror)) + raise IOError(err.errno, '%s: %s' % (name, err.strerror)) class posixfile(object): '''a file object aiming for POSIX-like semantics