Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Use super() in some places.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Dec 17, 2021
1 parent 8428ef6 commit b370d63
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions synapse/http/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ class RootRedirect(resource.Resource):
"""Redirects the root '/' path to another path."""

def __init__(self, path: str):
resource.Resource.__init__(self)
super().__init__()
self.url = path

def render_GET(self, request: Request) -> bytes:
Expand All @@ -539,7 +539,7 @@ def render_GET(self, request: Request) -> bytes:
def getChild(self, name: str, request: Request) -> resource.Resource:
if len(name) == 0:
return self # select ourselves as the child to render
return resource.Resource.getChild(self, name, request)
return super().getChild(name, request)


class OptionsResource(resource.Resource):
Expand All @@ -556,7 +556,7 @@ def render_OPTIONS(self, request: Request) -> bytes:
def getChildWithDefault(self, path: str, request: Request) -> resource.Resource:
if request.method == b"OPTIONS":
return self # select ourselves as the child to render
return resource.Resource.getChildWithDefault(self, path, request)
return super().getChildWithDefault(path, request)


class RootOptionsRedirectResource(OptionsResource, RootRedirect):
Expand Down

0 comments on commit b370d63

Please sign in to comment.