diff options
author | David Baker <dave@matrix.org> | 2015-03-31 14:40:02 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2015-03-31 14:40:02 +0100 |
commit | d18e7779cae4610d9e1425e4f01681359a20d374 (patch) | |
tree | 3db95823541ccb184f26754002067546d1afb1d7 /synapse/http/server.py | |
parent | pep8 (diff) | |
download | synapse-d18e7779cae4610d9e1425e4f01681359a20d374.tar.xz |
Grammar and deduplication
Diffstat (limited to 'synapse/http/server.py')
-rw-r--r-- | synapse/http/server.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py index dee49b9e18..b5c1a3cee2 100644 --- a/synapse/http/server.py +++ b/synapse/http/server.py @@ -57,10 +57,10 @@ class HttpServer(object): """ def register_path(self, method, path_pattern, callback): - """ Register a callback that get's fired if we receive a http request + """ Register a callback that gets fired if we receive a http request with the given method for a path that matches the given regex. - If the regex contains groups these get's passed to the calback via + If the regex contains groups these gets passed to the calback via an unpacked tuple. Args: @@ -111,9 +111,8 @@ class JsonResource(HttpServer, resource.Resource): interface=self.hs.config.bind_host ) - # Gets called by twisted def render(self, request): - """ This get's called by twisted every time someone sends us a request. + """ This gets called by twisted every time someone sends us a request. """ self._async_render_with_logging_context(request) return server.NOT_DONE_YET @@ -130,7 +129,7 @@ class JsonResource(HttpServer, resource.Resource): @defer.inlineCallbacks def _async_render(self, request): - """ This get's called by twisted every time someone sends us a request. + """ This gets called by twisted every time someone sends us a request. This checks if anyone has registered a callback for that method and path. """ |