Add get_room_version method

So that we can start factoring out some of this boilerplatey boilerplate.
This commit is contained in:
Richard van der Hoff 2020-01-31 10:28:15 +00:00
parent d7bf793cc1
commit 08f41a6f05
2 changed files with 26 additions and 5 deletions

View file

@ -402,11 +402,9 @@ class UnsupportedRoomVersionError(SynapseError):
"""The client's request to create a room used a room version that the server does
not support."""
def __init__(self):
def __init__(self, msg="Homeserver does not support this room version"):
super(UnsupportedRoomVersionError, self).__init__(
code=400,
msg="Homeserver does not support this room version",
errcode=Codes.UNSUPPORTED_ROOM_VERSION,
code=400, msg=msg, errcode=Codes.UNSUPPORTED_ROOM_VERSION,
)