diff options
author | Erik Johnston <erik@matrix.org> | 2018-01-16 16:24:15 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-01-16 16:24:15 +0000 |
commit | d863f68cab9665335b1657feeab5d00724dddd95 (patch) | |
tree | 78f25f1733097dded08449d709642b85b93a869a /synapse/rest/media | |
parent | Change _generate_thumbnails to take media_type (diff) | |
download | synapse-d863f68cab9665335b1657feeab5d00724dddd95.tar.xz |
Use local vars
Diffstat (limited to 'synapse/rest/media')
-rw-r--r-- | synapse/rest/media/v1/media_repository.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/synapse/rest/media/v1/media_repository.py b/synapse/rest/media/v1/media_repository.py index e08cf8af46..22f86781f7 100644 --- a/synapse/rest/media/v1/media_repository.py +++ b/synapse/rest/media/v1/media_repository.py @@ -146,13 +146,9 @@ class MediaRepository(object): media_length=content_length, user_id=auth_user, ) - media_info = { - "media_type": media_type, - "media_length": content_length, - } yield self._generate_thumbnails( - None, media_id, media_id, media_info["media_type"], + None, media_id, media_id, media_type, ) defer.returnValue("mxc://%s/%s" % (self.server_name, media_id)) @@ -415,7 +411,7 @@ class MediaRepository(object): } yield self._generate_thumbnails( - server_name, media_id, file_id, media_info["media_type"], + server_name, media_id, file_id, media_type, ) defer.returnValue(media_info) |