diff options
author | David Baker <dave@matrix.org> | 2016-04-28 15:16:30 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2016-04-28 15:16:30 +0100 |
commit | 60f86fc876bcb106842d804baac9aff4860ece3b (patch) | |
tree | a9d19b90769c35e56d0d7354885e55cc26c16e60 /synapse | |
parent | Only import email pusher if email notifs are on (diff) | |
download | synapse-60f86fc876bcb106842d804baac9aff4860ece3b.tar.xz |
pep8
Diffstat (limited to '')
-rw-r--r-- | synapse/config/emailconfig.py | 2 | ||||
-rw-r--r-- | synapse/push/mailer.py | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/synapse/config/emailconfig.py b/synapse/config/emailconfig.py index 893034e2ef..06b076e3f9 100644 --- a/synapse/config/emailconfig.py +++ b/synapse/config/emailconfig.py @@ -48,7 +48,7 @@ class EmailConfig(Config): if (len(missing) > 0): raise RuntimeError( "email.enable_notifs is True but required keys are missing: %s" % - (", ".join(["email."+k for k in missing]),) + (", ".join(["email." + k for k in missing]),) ) if config.get("public_baseurl") is None: diff --git a/synapse/push/mailer.py b/synapse/push/mailer.py index d2cf24765a..ae3e41b8ce 100644 --- a/synapse/push/mailer.py +++ b/synapse/push/mailer.py @@ -62,7 +62,7 @@ ALLOWED_ATTRS = { "img": ["src"], } # When bleach release a version with this option, we can specify schemes -#ALLOWED_SCHEMES = ["http", "https", "ftp", "mailto"] +# ALLOWED_SCHEMES = ["http", "https", "ftp", "mailto"] class Mailer(object): @@ -283,7 +283,8 @@ class Mailer(object): return MESSAGES_FROM_PERSON % ( descriptor_from_member_events([ - state_by_room[room_id][("m.room.member", s)] for s in sender_ids + state_by_room[room_id][("m.room.member", s)] + for s in sender_ids ]) ) else: @@ -346,11 +347,13 @@ def deduped_ordered_list(l): ret.append(item) return ret + def string_ordinal_total(s): tot = 0 for c in s: tot += ord(c) return tot + def format_ts_filter(value, format): return time.strftime(format, time.localtime(value / 1000)) |