diff --git a/zerver/decorator.py b/zerver/decorator.py index e557a03952..6e75bcf6de 100644 --- a/zerver/decorator.py +++ b/zerver/decorator.py @@ -25,7 +25,7 @@ class _RespondAsynchronously(object): pass # Return RespondAsynchronously from an @asynchronous view if the -# response will be provided later by calling handler.humbug_finish(), +# response will be provided later by calling handler.zulip_finish(), # or has already been provided this way. We use this for longpolling # mode. RespondAsynchronously = _RespondAsynchronously() diff --git a/zerver/lib/event_queue.py b/zerver/lib/event_queue.py index 5b1d6188da..57b6c37fdb 100644 --- a/zerver/lib/event_queue.py +++ b/zerver/lib/event_queue.py @@ -53,11 +53,11 @@ class ClientDescriptor(object): self.event_queue.push(event) if self.current_handler is not None: try: - self.current_handler.humbug_finish(dict(result='success', msg='', - events=[event], - queue_id=self.event_queue.id), - self.current_handler._request, - apply_markdown=self.apply_markdown) + self.current_handler.zulip_finish(dict(result='success', msg='', + events=[event], + queue_id=self.event_queue.id), + self.current_handler._request, + apply_markdown=self.apply_markdown) except socket.error: pass self.disconnect_handler() diff --git a/zerver/management/commands/runtornado.py b/zerver/management/commands/runtornado.py index 8a626254a0..5f4dedf936 100644 --- a/zerver/management/commands/runtornado.py +++ b/zerver/management/commands/runtornado.py @@ -317,7 +317,7 @@ class AsyncDjangoHandler(tornado.web.RequestHandler, base.BaseHandler): return response - def humbug_finish(self, response, request, apply_markdown): + def zulip_finish(self, response, request, apply_markdown): # Make sure that Markdown rendering really happened, if requested. # This is a security issue because it's where we escape HTML. # c.f. ticket #64 diff --git a/zerver/tests.py b/zerver/tests.py index d6e7b0bbe3..cfb68772ca 100644 --- a/zerver/tests.py +++ b/zerver/tests.py @@ -1746,7 +1746,7 @@ class DummyHandler(object): def write(self, response): raise NotImplemented - def humbug_finish(self, response, *ignore): + def zulip_finish(self, response, *ignore): if self.assert_callback: self.assert_callback(response) diff --git a/zerver/tornadoviews.py b/zerver/tornadoviews.py index 9f799c367f..d464d81602 100644 --- a/zerver/tornadoviews.py +++ b/zerver/tornadoviews.py @@ -126,9 +126,9 @@ def get_updates_backend(request, user_profile, handler=None, dont_block, stream_name, apply_markdown=apply_markdown, **kwargs) if resp is not None: - handler.humbug_finish(resp, request, apply_markdown) + handler.zulip_finish(resp, request, apply_markdown) - # We have already invoked handler.humbug_finish(), so we bypass the usual view + # We have already invoked handler.zulip_finish(), so we bypass the usual view # response path. We are "responding asynchronously" except that it # already happened. This is slightly weird. return RespondAsynchronously @@ -157,10 +157,10 @@ def get_updates_backend(request, user_profile, handler=None, # We must return a response because we don't have # a way to re-queue a callback and so the client # must do it by making a new request - handler.humbug_finish({"result": "success", - "msg": "", - 'update_types': []}, - request, apply_markdown) + handler.zulip_finish({"result": "success", + "msg": "", + 'update_types': []}, + request, apply_markdown) return kwargs.update(cb_kwargs) @@ -168,7 +168,7 @@ def get_updates_backend(request, user_profile, handler=None, client_server_generation=client_server_generation, apply_markdown=apply_markdown, **kwargs) - handler.humbug_finish(res, request, apply_markdown) + handler.zulip_finish(res, request, apply_markdown) except socket.error: pass