From c77cf637325ec53ded4d805a43f829c3b6c0eaf3 Mon Sep 17 00:00:00 2001 From: Sandip Date: Thu, 2 Dec 2021 11:06:38 +0100 Subject: [PATCH] Fix key error on metainfo_requests pop --- .../components/libtorrent/download_manager/download_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tribler-core/tribler_core/components/libtorrent/download_manager/download_manager.py b/src/tribler-core/tribler_core/components/libtorrent/download_manager/download_manager.py index ce85c1bd002..9c4ecfe2a4a 100644 --- a/src/tribler-core/tribler_core/components/libtorrent/download_manager/download_manager.py +++ b/src/tribler-core/tribler_core/components/libtorrent/download_manager/download_manager.py @@ -471,7 +471,7 @@ async def get_metainfo(self, infohash, timeout=30, hops=None, url=None): self.metainfo_requests[infohash][1] -= 1 if self.metainfo_requests[infohash][1] <= 0: await self.remove_download(download, remove_content=True) - self.metainfo_requests.pop(infohash) + self.metainfo_requests.pop(infohash, None) return metainfo