summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/__init__.py7
-rw-r--r--synapse/storage/event_federation.py9
2 files changed, 7 insertions, 9 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 7d810e6a62..4034437f6b 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -494,11 +494,13 @@ def prepare_database(db_conn):
         user_version = row[0]
 
         if user_version > SCHEMA_VERSION:
-            raise ValueError("Cannot use this database as it is too " +
+            raise ValueError(
+                "Cannot use this database as it is too " +
                 "new for the server to understand"
             )
         elif user_version < SCHEMA_VERSION:
-            logging.info("Upgrading database from version %d",
+            logging.info(
+                "Upgrading database from version %d",
                 user_version
             )
 
@@ -520,4 +522,3 @@ def prepare_database(db_conn):
         c.execute("PRAGMA user_version = %d" % SCHEMA_VERSION)
 
     c.close()
-
diff --git a/synapse/storage/event_federation.py b/synapse/storage/event_federation.py
index a707030145..a027db3868 100644
--- a/synapse/storage/event_federation.py
+++ b/synapse/storage/event_federation.py
@@ -215,7 +215,7 @@ class EventFederationStore(SQLBaseStore):
         min_depth = self._simple_select_one_onecol_txn(
             txn,
             table="room_depth",
-            keyvalues={"room_id": room_id,},
+            keyvalues={"room_id": room_id},
             retcol="min_depth",
             allow_none=True,
         )
@@ -267,10 +267,8 @@ class EventFederationStore(SQLBaseStore):
                     }
                 )
 
-
-
-            # We only insert as a forward extremity the new pdu if there are no
-            # other pdus that reference it as a prev pdu
+            # We only insert as a forward extremity the new pdu if there are
+            # no other pdus that reference it as a prev pdu
             query = (
                 "INSERT OR IGNORE INTO %(table)s (event_id, room_id) "
                 "SELECT ?, ? WHERE NOT EXISTS ("
@@ -312,7 +310,6 @@ class EventFederationStore(SQLBaseStore):
             )
             txn.execute(query)
 
-
     def get_backfill_events(self, room_id, event_list, limit):
         """Get a list of Events for a given topic that occured before (and
         including) the pdus in pdu_list. Return a list of max size `limit`.