From a533c25efd6f271788b4e9c662778586ac7d020f Mon Sep 17 00:00:00 2001 From: Andrea Spacca Date: Tue, 22 Dec 2020 17:45:34 +0100 Subject: [PATCH] little cleaning --- pantalaimon/daemon.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pantalaimon/daemon.py b/pantalaimon/daemon.py index 52d5628..04ea925 100755 --- a/pantalaimon/daemon.py +++ b/pantalaimon/daemon.py @@ -846,7 +846,7 @@ class ProxyDaemon: self.store.save_media(self.name, media) try: - response, decrypted_file, error = await self._load_media(mxc_server, mxc_path, file_name, request) + response, decrypted_file = await self._load_media(mxc_server, mxc_path, file_name, request) if response is None and decrypted_file is None: return await self.forward_to_web(request, token=client.access_token) @@ -865,10 +865,10 @@ class ProxyDaemon: encrypt=False, ) - if not isinstance(decrypted_upload[0], UploadResponse): + if not isinstance(decrypted_upload, UploadResponse): raise ValueError - content["url"] = decrypted_upload[0].content_uri + content["url"] = decrypted_upload.content_uri return content @@ -1182,7 +1182,7 @@ class ProxyDaemon: file_name = request.match_info.get("file_name") try: - response, decrypted_file, error = await self._load_media(server_name, media_id, file_name, request) + response, decrypted_file = await self._load_media(server_name, media_id, file_name, request) if response is None and decrypted_file is None: return await self.forward_to_web(request)