--- 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