diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-05-31 19:03:47 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-31 19:03:47 +1000 |
commit | c936a52a9eb18e302fbd5158da7188f674912530 (patch) | |
tree | ce74f2a73cc4730199dfca39420a5564f36daab7 /synapse/handlers/device.py | |
parent | Merge pull request #3303 from NotAFile/py3-memoryview (diff) | |
download | synapse-c936a52a9eb18e302fbd5158da7188f674912530.tar.xz |
Consistently use six's iteritems and wrap lazy keys/values in list() if they're not meant to be lazy (#3307)
Diffstat (limited to 'synapse/handlers/device.py')
-rw-r--r-- | synapse/handlers/device.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py index 31bd0e60c6..11c6fb3657 100644 --- a/synapse/handlers/device.py +++ b/synapse/handlers/device.py @@ -114,7 +114,7 @@ class DeviceHandler(BaseHandler): user_id, device_id=None ) - devices = device_map.values() + devices = list(device_map.values()) for device in devices: _update_device_from_client_ips(device, ips) @@ -187,7 +187,7 @@ class DeviceHandler(BaseHandler): defer.Deferred: """ device_map = yield self.store.get_devices_by_user(user_id) - device_ids = device_map.keys() + device_ids = list(device_map) if except_device_id is not None: device_ids = [d for d in device_ids if d != except_device_id] yield self.delete_devices(user_id, device_ids) |