303
303
if have_pywin32 and sys.platform == 'win32':
305
311
class _w32c_FileLock(_OSLock):
307
313
def _open(self, filename, access, share, cflags, pymode):
308
314
self.filename = osutils.realpath(filename)
310
self._handle = win32file.CreateFile(filename, access, share,
316
self._handle = win32file_CreateFile(filename, access, share,
311
317
None, win32file.OPEN_ALWAYS,
312
318
win32file.FILE_ATTRIBUTE_NORMAL, None)
313
319
except pywintypes.error, e: