summary refs log tree commit diff
path: root/synapse/notifier.py
diff options
context:
space:
mode:
authorAdrian Tschira <nota@notafile.com>2018-04-15 16:39:30 +0200
committerAdrian Tschira <nota@notafile.com>2018-04-15 20:40:47 +0200
commitf63ff73c7fc9e27fa42ac73bf520796ff37bfcc2 (patch)
treee30c3b41cd4ff3f939e68de053f28ba4edfd30dd /synapse/notifier.py
parentMerge branch 'master' of https://github.com/matrix-org/synapse into develop (diff)
downloadsynapse-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.py1
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):