diff mercurial/windows.py @ 8951:835a51e63c5b

windows: fix use of undefined exception (issue1707) This fixes the implied reliance on pywin32 and the win32 module. This also fixes a regression in ae275ad46bd0 that made Mercurial unusable without pywin32.
author Henrik Stuart <hg@hstuart.dk>
date Thu, 25 Jun 2009 22:43:58 +0200
parents ae275ad46bd0
children 3d456bf32f18
line wrap: on
line diff
--- a/mercurial/windows.py	Sat Jun 27 13:05:25 2009 +0200
+++ b/mercurial/windows.py	Thu Jun 25 22:43:58 2009 +0200
@@ -8,7 +8,6 @@
 from i18n import _
 import osutil, error
 import errno, msvcrt, os, re, sys
-from mercurial import win32
 
 nulldev = 'NUL:'
 umask = 002
@@ -18,7 +17,7 @@
     try:
         return osutil.posixfile(name, mode, buffering)
     except WindowsError, err:
-        raise win32.WinIOError(err)
+        raise IOError(err.errno, err.strerror)
 posixfile.__doc__ = osutil.posixfile.__doc__
 
 class winstdout(object):