diff options
author | Jorik Schellekens <joriks@matrix.org> | 2019-08-05 13:48:09 +0100 |
---|---|---|
committer | Jorik Schellekens <joriks@matrix.org> | 2019-08-05 13:48:09 +0100 |
commit | e7f42857bbb191140bd9985dd50ce76ad7fd7e3a (patch) | |
tree | 6de9595dc9dbd62edf48835156028407d5736254 | |
parent | Nicer use of dict update methods. (diff) | |
download | synapse-e7f42857bbb191140bd9985dd50ce76ad7fd7e3a.tar.xz |
Refactor return value so we don't create identical lists each time.
-rw-r--r-- | synapse/handlers/device.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py index 4fef2aef0c..ff198d0a3e 100644 --- a/synapse/handlers/device.py +++ b/synapse/handlers/device.py @@ -216,11 +216,11 @@ class DeviceWorkerHandler(BaseHandler): possibly_joined = [] possibly_left = [] - opentracing.log_kv( - {"changed": list(possibly_joined), "left": list(possibly_left)} - ) + result = {"changed": list(possibly_joined), "left": list(possibly_left)} + + opentracing.log_kv(result) - return {"changed": list(possibly_joined), "left": list(possibly_left)} + return {result} class DeviceHandler(DeviceWorkerHandler): |