summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-04-07 16:07:16 +0100
committerErik Johnston <erik@matrix.org>2016-04-07 16:07:16 +0100
commit95ac3078da54908855721361b1305ed0c41215d5 (patch)
tree9680ceeec2edd83337613c86dde5949727721148
parentLog contexts and squash things together (diff)
downloadsynapse-95ac3078da54908855721361b1305ed0c41215d5.tar.xz
Rename things
-rw-r--r--synapse/util/async.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/util/async.py b/synapse/util/async.py
index 072b6362b5..0d6f48e2d8 100644
--- a/synapse/util/async.py
+++ b/synapse/util/async.py
@@ -175,13 +175,13 @@ class Linearizer(object):
             yield preserve_context_over_deferred(current_defer)
 
         @contextmanager
-        def _ctx_manager(d):
+        def _ctx_manager():
             try:
                 yield
             finally:
-                d.callback(None)
-                d = self.key_to_defer.get(key)
-                if d is new_defer:
+                new_defer.callback(None)
+                current_d = self.key_to_defer.get(key)
+                if current_d is new_defer:
                     self.key_to_defer.pop(key, None)
 
-        defer.returnValue(_ctx_manager(new_defer))
+        defer.returnValue(_ctx_manager())