Fix file cache when using MemorySession (#1033)

This commit is contained in:
K900 2018-11-01 12:29:23 +03:00 committed by Lonami
parent 67c5572d7b
commit 20a8081e8e

View File

@ -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