summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/events/__init__.py3
-rw-r--r--synapse/federation/federation_client.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py
index e6f94e68af..154a7c0198 100644
--- a/synapse/events/__init__.py
+++ b/synapse/events/__init__.py
@@ -247,6 +247,7 @@ def room_version_to_event_format(room_version):
         int
     """
     if room_version not in KNOWN_ROOM_VERSIONS:
-        raise
+        # We should have already checked version, so this should not happen
+        raise RuntimeError("Unrecognized room version %s" % (room_version,))
 
     return EventFormatVersions.V1
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py
index 0757ad12f4..c43f21a0ba 100644
--- a/synapse/federation/federation_client.py
+++ b/synapse/federation/federation_client.py
@@ -543,7 +543,8 @@ class FederationClient(FederationBase):
         Return:
             Deferred[tuple[str, dict, int]]: resolves to a tuple of
             `(origin, event, event_format)` where origin is the remote
-            homeserver which generated the event.
+            homeserver which generated the event, and event_format is one of
+            `synapse.api.constants.EventFormatVersions`.
 
             Fails with a ``SynapseError`` if the chosen remote server
             returns a 300/400 code.