~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lock.py

  • Committer: Jelmer Vernooij
  • Date: 2011-03-30 11:45:54 UTC
  • mto: (5622.4.1 uninstall-hook)
  • mto: This revision was merged to the branch mainline in revision 5747.
  • Revision ID: jelmer@samba.org-20110330114554-zx7av89umf2dd9an
Don't require arguments to hooks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
 
51
51
class LockHooks(Hooks):
52
52
 
53
 
    def __init__(self, module_name, member_name):
54
 
        Hooks.__init__(self, module_name, member_name)
 
53
    def __init__(self):
 
54
        Hooks.__init__(self, "bzrlib.lock", "Lock.hooks")
55
55
        self.add_hook('lock_acquired',
56
56
            "Called with a bzrlib.lock.LockResult when a physical lock is "
57
57
            "acquired.", (1, 8))
69
69
    :cvar hooks: Hook dictionary for operations on locks.
70
70
    """
71
71
 
72
 
    hooks = LockHooks("bzrlib.lock", "Lock.hooks")
 
72
    hooks = LockHooks()
73
73
 
74
74
 
75
75
class LockResult(object):