~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lock.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-07-08 01:24:43 UTC
  • mfrom: (4501.2.2 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090708012443-fd0130qlk7tfjy2q
(mbp) integrated community patches to docs and OS locks

Show diffs side-by-side

added added

removed removed

Lines of Context:
301
301
 
302
302
 
303
303
if have_pywin32 and sys.platform == 'win32':
 
304
    if os.path.supports_unicode_filenames:
 
305
        # for Windows NT/2K/XP/etc
 
306
        win32file_CreateFile = win32file.CreateFileW
 
307
    else:
 
308
        # for Windows 98
 
309
        win32file_CreateFile = win32file.CreateFile
304
310
 
305
311
    class _w32c_FileLock(_OSLock):
306
312
 
307
313
        def _open(self, filename, access, share, cflags, pymode):
308
314
            self.filename = osutils.realpath(filename)
309
315
            try:
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: