From 20a8081e8e34da22bca7ab743f7ff7908920595e Mon Sep 17 00:00:00 2001 From: K900 Date: Thu, 1 Nov 2018 12:29:23 +0300 Subject: [PATCH] Fix file cache when using MemorySession (#1033) --- telethon/sessions/memory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/sessions/memory.py b/telethon/sessions/memory.py index c18bf51d..edd662af 100644 --- a/telethon/sessions/memory.py +++ b/telethon/sessions/memory.py @@ -235,6 +235,6 @@ class MemorySession(Session): def get_file(self, md5_digest, file_size, cls): key = (md5_digest, file_size, _SentFileType.from_type(cls)) try: - return cls(self._files[key]) + return cls(*self._files[key]) except KeyError: return None