~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockable_files.py

  • Committer: John Arbash Meinel
  • Date: 2009-07-24 18:26:21 UTC
  • mfrom: (4567 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4568.
  • Revision ID: john@arbash-meinel.com-20090724182621-68s2jhoqf3pn72n7
Merge bzr.dev 4567 to resolve NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
from bzrlib import (
25
25
    counted_lock,
26
26
    errors,
 
27
    lock,
27
28
    osutils,
28
29
    transactions,
29
30
    urlutils,
308
309
 
309
310
    def unlock(self):
310
311
        if not self._lock_mode:
311
 
            raise errors.LockNotHeld(self)
 
312
            return lock.cant_unlock_not_held(self)
312
313
        if self._lock_warner.lock_count > 1:
313
314
            self._lock_warner.lock_count -= 1
314
315
        else: