diff options
author | Adrian Tschira <nota@notafile.com> | 2018-04-15 16:39:30 +0200 |
---|---|---|
committer | Adrian Tschira <nota@notafile.com> | 2018-04-15 20:40:47 +0200 |
commit | f63ff73c7fc9e27fa42ac73bf520796ff37bfcc2 (patch) | |
tree | e30c3b41cd4ff3f939e68de053f28ba4edfd30dd /synapse/notifier.py | |
parent | Merge branch 'master' of https://github.com/matrix-org/synapse into develop (diff) | |
download | synapse-f63ff73c7fc9e27fa42ac73bf520796ff37bfcc2.tar.xz |
add __bool__ alias to __nonzero__ methods
Signed-off-by: Adrian Tschira <nota@notafile.com>
Diffstat (limited to 'synapse/notifier.py')
-rw-r--r-- | synapse/notifier.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py index ef042681bc..0e40a4aad6 100644 --- a/synapse/notifier.py +++ b/synapse/notifier.py @@ -144,6 +144,7 @@ class _NotifierUserStream(object): class EventStreamResult(namedtuple("EventStreamResult", ("events", "tokens"))): def __nonzero__(self): return bool(self.events) + __bool__ = __nonzero__ # python3 class Notifier(object): |