~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/server.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:
233
233
class SmartServerHooks(Hooks):
234
234
    """Hooks for the smart server."""
235
235
 
236
 
    def __init__(self, module_name, member_name):
 
236
    def __init__(self):
237
237
        """Create the default hooks.
238
238
 
239
239
        These are all empty initially, because by default nothing should get
240
240
        notified.
241
241
        """
242
 
        Hooks.__init__(self, module_name, member_name)
 
242
        Hooks.__init__(self, "bzrlib.smart.server", "SmartTCPServer.hooks")
243
243
        self.add_hook('server_started',
244
244
            "Called by the bzr server when it starts serving a directory. "
245
245
            "server_started is called with (backing urls, public url), "
255
255
            "server_stopped is called with the same parameters as the "
256
256
            "server_started hook: (backing_urls, public_url).", (0, 16))
257
257
 
258
 
SmartTCPServer.hooks = SmartServerHooks("bzrlib.smart.server", "SmartTCPServer.hooks")
 
258
SmartTCPServer.hooks = SmartServerHooks()
259
259
 
260
260
 
261
261
def _local_path_for_transport(transport):