From ca91bb2f7f22604ba582b149759cc9d7c6ae18c0 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Wed, 19 Nov 2014 17:18:55 +0000 Subject: [PATCH] Sometimes there isn't a current logging context --- synapse/util/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/util/__init__.py b/synapse/util/__init__.py index 9ad613b8f1..e57fb0e914 100644 --- a/synapse/util/__init__.py +++ b/synapse/util/__init__.py @@ -38,7 +38,7 @@ class Clock(object): def call_later(self, delay, callback): current_context = LoggingContext.current_context() def wrapped_callback(): - current_context.thread_local.current_context = current_context + LoggingContext.thread_local.current_context = current_context callback() return reactor.callLater(delay, wrapped_callback)