~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: 2006-07-03 13:56:48 UTC
  • mfrom: (1711.4.41 win32-accepted)
  • Revision ID: pqm@pqm.ubuntu.com-20060703135648-b927e5efb9f5b907
(jam) cleanup for win32, close open file handles, tests pass

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
                    overlapped = pywintypes.OVERLAPPED()
130
130
                    win32file.LockFileEx(self.hfile, lockmode, 0, 0x7fff0000, overlapped)
131
131
                except Exception, e:
 
132
                    if self.f:
 
133
                        self.f.close()
 
134
                        self.f = None
132
135
                    raise LockError(e)
133
136
 
134
137
            def unlock(self):