def get_request_callback(self): class Handler(RequestHandler): def data(self): self.finish() self.finish() return Application(Handler)
def get_request_callback(self): class Handler(RequestHandler): def data(self): raise errors.SMTPError(self.settings['status_code'], self.settings['message']) return Application(Handler, status_code=self.status_code, message=self.message)
def get_request_callback(self): class Handler(RequestHandler): def data(h): self.request_mail = h.request.mail self.request_rcpt = h.request.rcpt self.request_data = h.request.data self.request_message = h.request.message self.request_repr = '%s' % h.request return Application(Handler)
def get_request_callback(self): class Handler(RequestHandler): @gen.coroutine def coroutine_decorated(h): raise gen.Return(self.coroutine_result) @gen.coroutine def data(h): self.data_result = yield h.coroutine_decorated() return Application(Handler)
def get_request_callback(self): class Handler(RequestHandler): def data(self): return True return Application(Handler)
def get_request_callback(self): class Handler(RequestHandler): def data(self): raise Exception('This is a custom exception') return Application(Handler)
def get_request_callback(self): class Handler(RequestHandler): pass return Application(Handler)