summary refs log tree commit diff
path: root/synapse/util/logcontext.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/util/logcontext.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/util/logcontext.py')
-rw-r--r--synapse/util/logcontext.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/synapse/util/logcontext.py b/synapse/util/logcontext.py
index d660ec785b..d59adc236e 100644
--- a/synapse/util/logcontext.py
+++ b/synapse/util/logcontext.py
@@ -92,6 +92,7 @@ class LoggingContext(object):
 
         def __nonzero__(self):
             return False
+        __bool__ = __nonzero__  # python3
 
     sentinel = Sentinel()