blindly incorporate PR review - needs testing & fixing

This commit is contained in:
Matthew Hodgson 2017-12-18 01:52:46 +00:00 committed by Hubert Chathi
parent 69e51c7ba4
commit 0abb205b47
5 changed files with 98 additions and 78 deletions

View file

@ -289,9 +289,14 @@ class LimitExceededError(SynapseError):
class RoomKeysVersionError(SynapseError):
"""A client has tried to upload to a non-current version of the room_keys store
"""
def __init__(self, code=403, msg="Wrong room_keys version", current_version=None,
errcode=Codes.WRONG_ROOM_KEYS_VERSION):
super(RoomKeysVersionError, self).__init__(code, msg, errcode)
def __init__(self, current_version):
"""
Args:
current_version (str): the current version of the store they should have used
"""
super(RoomKeysVersionError, self).__init__(
403, "Wrong room_keys version", Codes.WRONG_ROOM_KEYS_VERSION
)
self.current_version = current_version
def error_dict(self):