summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorRichard van der Hoff <github@rvanderhoff.org.uk>2017-10-23 17:39:31 +0100
committerGitHub <noreply@github.com>2017-10-23 17:39:31 +0100
commit0d437698b2e040eface5094852576c43916c2e0c (patch)
tree9090c6c6f5ba5566786b8654cee07b3c3acd97c8 /synapse/storage
parentMerge pull request #2566 from matrix-org/rav/media_logcontext_leak (diff)
parentfix vars named `l` (diff)
downloadsynapse-0d437698b2e040eface5094852576c43916c2e0c.tar.xz
Merge pull request #2568 from matrix-org/rav/pep8
PEP8 fixes
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/_base.py2
-rw-r--r--synapse/storage/background_updates.py2
-rw-r--r--synapse/storage/events.py2
-rw-r--r--synapse/storage/prepare_database.py2
-rw-r--r--synapse/storage/roommember.py2
-rw-r--r--synapse/storage/schema/delta/30/as_users.py2
-rw-r--r--synapse/storage/search.py4
7 files changed, 8 insertions, 8 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index 5124a833a5..6caf7b3356 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -103,7 +103,7 @@ class LoggingTransaction(object):
                     "[SQL values] {%s} %r",
                     self.name, args[0]
                 )
-            except:
+            except Exception:
                 # Don't let logging failures stop SQL from working
                 pass
 
diff --git a/synapse/storage/background_updates.py b/synapse/storage/background_updates.py
index 7157fb1dfb..a6e6f52a6a 100644
--- a/synapse/storage/background_updates.py
+++ b/synapse/storage/background_updates.py
@@ -98,7 +98,7 @@ class BackgroundUpdateStore(SQLBaseStore):
                 result = yield self.do_next_background_update(
                     self.BACKGROUND_UPDATE_DURATION_MS
                 )
-            except:
+            except Exception:
                 logger.exception("Error doing update")
             else:
                 if result is None:
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index 637640ec2a..4298d8baf1 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -1481,7 +1481,7 @@ class EventsStore(SQLBaseStore):
                                         for i in ids
                                         if i in res
                                     ])
-                            except:
+                            except Exception:
                                 logger.exception("Failed to callback")
                 with PreserveLoggingContext():
                     reactor.callFromThread(fire, event_list, row_dict)
diff --git a/synapse/storage/prepare_database.py b/synapse/storage/prepare_database.py
index ccaaabcfa0..817c2185c8 100644
--- a/synapse/storage/prepare_database.py
+++ b/synapse/storage/prepare_database.py
@@ -66,7 +66,7 @@ def prepare_database(db_conn, database_engine, config):
 
         cur.close()
         db_conn.commit()
-    except:
+    except Exception:
         db_conn.rollback()
         raise
 
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py
index a0fc9a6867..3fa8019eb7 100644
--- a/synapse/storage/roommember.py
+++ b/synapse/storage/roommember.py
@@ -636,7 +636,7 @@ class RoomMemberStore(SQLBaseStore):
                 room_id = row["room_id"]
                 try:
                     content = json.loads(row["content"])
-                except:
+                except Exception:
                     continue
 
                 display_name = content.get("displayname", None)
diff --git a/synapse/storage/schema/delta/30/as_users.py b/synapse/storage/schema/delta/30/as_users.py
index 5b7d8d1ab5..c53e53c94f 100644
--- a/synapse/storage/schema/delta/30/as_users.py
+++ b/synapse/storage/schema/delta/30/as_users.py
@@ -22,7 +22,7 @@ def run_create(cur, database_engine, *args, **kwargs):
     # NULL indicates user was not registered by an appservice.
     try:
         cur.execute("ALTER TABLE users ADD COLUMN appservice_id TEXT")
-    except:
+    except Exception:
         # Maybe we already added the column? Hope so...
         pass
 
diff --git a/synapse/storage/search.py b/synapse/storage/search.py
index 8f2b3c4435..05d4ef586e 100644
--- a/synapse/storage/search.py
+++ b/synapse/storage/search.py
@@ -81,7 +81,7 @@ class SearchStore(BackgroundUpdateStore):
                     etype = row["type"]
                     try:
                         content = json.loads(row["content"])
-                    except:
+                    except Exception:
                         continue
 
                     if etype == "m.room.message":
@@ -407,7 +407,7 @@ class SearchStore(BackgroundUpdateStore):
                 origin_server_ts, stream = pagination_token.split(",")
                 origin_server_ts = int(origin_server_ts)
                 stream = int(stream)
-            except:
+            except Exception:
                 raise SynapseError(400, "Invalid pagination token")
 
             clauses.append(