summary refs log tree commit diff
path: root/synapse/push/__init__.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-01-29 16:10:35 +0000
committerMark Haines <mark.haines@matrix.org>2015-01-29 16:12:40 +0000
commitacb68a39e02f405c116135400e33a3b1940a07f8 (patch)
tree4629354ff9d7091b8073558dc642ee188b16f136 /synapse/push/__init__.py
parentOnly send a badge-reset if the user actually has unread notifications. (diff)
downloadsynapse-acb68a39e02f405c116135400e33a3b1940a07f8.tar.xz
Code style fixes.
Diffstat (limited to 'synapse/push/__init__.py')
-rw-r--r--synapse/push/__init__.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/synapse/push/__init__.py b/synapse/push/__init__.py
index fa967c5a5d..472ede5480 100644
--- a/synapse/push/__init__.py
+++ b/synapse/push/__init__.py
@@ -189,8 +189,8 @@ class Pusher(object):
                             # for sanity, we only remove the pushkey if it
                             # was the one we actually sent...
                             logger.warn(
-                                ("Ignoring rejected pushkey %s because we "
-                                "didn't send it"), pk
+                                ("Ignoring rejected pushkey %s because we"
+                                 " didn't send it"), pk
                             )
                         else:
                             logger.info(
@@ -236,8 +236,7 @@ class Pusher(object):
                     # of old notifications.
                     logger.warn("Giving up on a notification to user %s, "
                                 "pushkey %s",
-                                self.user_name, self.pushkey
-                    )
+                                self.user_name, self.pushkey)
                     self.backoff_delay = Pusher.INITIAL_BACKOFF
                     self.last_token = chunk['end']
                     self.store.update_pusher_last_token(
@@ -258,8 +257,7 @@ class Pusher(object):
                                 "Trying again in %dms",
                                 self.user_name,
                                 self.clock.time_msec() - self.failing_since,
-                                self.backoff_delay
-                    )
+                                self.backoff_delay)
                     yield synapse.util.async.sleep(self.backoff_delay / 1000.0)
                     self.backoff_delay *= 2
                     if self.backoff_delay > Pusher.MAX_BACKOFF:
@@ -299,7 +297,6 @@ class Pusher(object):
                     self.has_unread = False
 
 
-
 def _value_for_dotted_key(dotted_key, event):
     parts = dotted_key.split(".")
     val = event
@@ -310,6 +307,7 @@ def _value_for_dotted_key(dotted_key, event):
         parts = parts[1:]
     return val
 
+
 def _tweaks_for_actions(actions):
     tweaks = {}
     for a in actions:
@@ -319,6 +317,7 @@ def _tweaks_for_actions(actions):
             tweaks['sound'] = a['set_sound']
     return tweaks
 
+
 class PusherConfigException(Exception):
     def __init__(self, msg):
-        super(PusherConfigException, self).__init__(msg)
\ No newline at end of file
+        super(PusherConfigException, self).__init__(msg)