Rename humbug_finish to zulip_finish.

(imported from commit a73ef9302d16a4068c7d050d4882d2eba699488d)
This commit is contained in:
Tim Abbott 2013-08-06 16:21:12 -04:00
parent 661ca38b58
commit d59ba39518
5 changed files with 15 additions and 15 deletions

View File

@ -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()

View File

@ -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()

View File

@ -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

View File

@ -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)

View File

@ -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