mirror of
https://github.com/element-hq/synapse
synced 2024-09-17 15:25:11 +00:00
Slightly reduce the insane amounts of indentation in main http server response path, by 'continue'ing around a non-match or falling through
This commit is contained in:
parent
dc4b774f1e
commit
9d9d39536b
1 changed files with 19 additions and 17 deletions
|
@ -124,7 +124,9 @@ class JsonResource(HttpServer, resource.Resource):
|
||||||
# and path regex match
|
# and path regex match
|
||||||
for path_entry in self.path_regexs.get(request.method, []):
|
for path_entry in self.path_regexs.get(request.method, []):
|
||||||
m = path_entry.pattern.match(request.path)
|
m = path_entry.pattern.match(request.path)
|
||||||
if m:
|
if not m:
|
||||||
|
continue
|
||||||
|
|
||||||
# We found a match! Trigger callback and then return the
|
# We found a match! Trigger callback and then return the
|
||||||
# returned response. We pass both the request and any
|
# returned response. We pass both the request and any
|
||||||
# matched groups from the regex to the callback.
|
# matched groups from the regex to the callback.
|
||||||
|
|
Loading…
Reference in a new issue