summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-01-29 16:18:34 +0000
committerMark Haines <mark.haines@matrix.org>2015-01-29 16:18:34 +0000
commit295322048d7dc71ca008d85024cb538eec1e2b1a (patch)
treeaa780f1ea48cab989d2802673f76b5e7e5aca285 /synapse/storage
parentFix code-style (diff)
parentCode style fixes. (diff)
downloadsynapse-295322048d7dc71ca008d85024cb538eec1e2b1a.tar.xz
Merge branch 'develop' into client_v2_filter
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/push_rule.py9
-rw-r--r--synapse/storage/pusher.py2
2 files changed, 6 insertions, 5 deletions
diff --git a/synapse/storage/push_rule.py b/synapse/storage/push_rule.py
index c7b553292e..27502d2399 100644
--- a/synapse/storage/push_rule.py
+++ b/synapse/storage/push_rule.py
@@ -117,7 +117,7 @@ class PushRuleStore(SQLBaseStore):
         new_rule['priority'] = new_rule_priority
 
         sql = (
-            "SELECT COUNT(*) FROM "+PushRuleTable.table_name+
+            "SELECT COUNT(*) FROM " + PushRuleTable.table_name +
             " WHERE user_name = ? AND priority_class = ? AND priority = ?"
         )
         txn.execute(sql, (user_name, priority_class, new_rule_priority))
@@ -146,10 +146,11 @@ class PushRuleStore(SQLBaseStore):
 
         txn.execute(sql, new_rule.values())
 
-    def _add_push_rule_highest_priority_txn(self, txn, user_name, priority_class, **kwargs):
+    def _add_push_rule_highest_priority_txn(self, txn, user_name,
+                                            priority_class, **kwargs):
         # find the highest priority rule in that class
         sql = (
-            "SELECT COUNT(*), MAX(priority) FROM "+PushRuleTable.table_name+
+            "SELECT COUNT(*), MAX(priority) FROM " + PushRuleTable.table_name +
             " WHERE user_name = ? and priority_class = ?"
         )
         txn.execute(sql, (user_name, priority_class))
@@ -209,4 +210,4 @@ class PushRuleTable(Table):
         "actions",
     ]
 
-    EntryType = collections.namedtuple("PushRuleEntry", fields)
\ No newline at end of file
+    EntryType = collections.namedtuple("PushRuleEntry", fields)
diff --git a/synapse/storage/pusher.py b/synapse/storage/pusher.py
index 113cdc8a8e..f253c9e2c3 100644
--- a/synapse/storage/pusher.py
+++ b/synapse/storage/pusher.py
@@ -170,4 +170,4 @@ class PushersTable(Table):
         "failing_since"
     ]
 
-    EntryType = collections.namedtuple("PusherEntry", fields)
\ No newline at end of file
+    EntryType = collections.namedtuple("PusherEntry", fields)