summary refs log tree commit diff
path: root/synapse/notifier.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-04-20 15:43:39 +0100
committerGitHub <noreply@github.com>2018-04-20 15:43:39 +0100
commit8dc4a6144b14d381d19455dc75d3087ba46d70fc (patch)
treeceb7b80444194f0b56611e53e03ae21459c19074 /synapse/notifier.py
parentMerge pull request #3104 from NotAFile/py3-unittest-config (diff)
parentadd __bool__ alias to __nonzero__ methods (diff)
downloadsynapse-8dc4a6144b14d381d19455dc75d3087ba46d70fc.tar.xz
Merge pull request #3107 from NotAFile/py3-bool-nonzero
add __bool__ alias to __nonzero__ methods
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):