You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
413 B

class Interceptor(object):
"""Base class for event handler interceptors."""
def __init__(self, server):
self.server = server
def ignore_for(self, event, namespace):
return False
def before_event(self, event, namespace, args):
pass
def after_event(self, event, namespace, args):
pass
def handle_exception(self, event, namespace, exc):
raise exc