mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-27 12:08:32 +03:00
Use local vars
This commit is contained in:
parent
6368e5c0ab
commit
d863f68cab
1 changed files with 2 additions and 6 deletions
|
@ -146,13 +146,9 @@ class MediaRepository(object):
|
||||||
media_length=content_length,
|
media_length=content_length,
|
||||||
user_id=auth_user,
|
user_id=auth_user,
|
||||||
)
|
)
|
||||||
media_info = {
|
|
||||||
"media_type": media_type,
|
|
||||||
"media_length": content_length,
|
|
||||||
}
|
|
||||||
|
|
||||||
yield self._generate_thumbnails(
|
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))
|
defer.returnValue("mxc://%s/%s" % (self.server_name, media_id))
|
||||||
|
@ -415,7 +411,7 @@ class MediaRepository(object):
|
||||||
}
|
}
|
||||||
|
|
||||||
yield self._generate_thumbnails(
|
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)
|
defer.returnValue(media_info)
|
||||||
|
|
Loading…
Reference in a new issue