summary refs log tree commit diff
path: root/synapse/util
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/util
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/util')
-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()