Handle KeyError exception in Telegram download error

Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
This commit is contained in:
lzzy12 2020-03-27 16:00:37 +05:30
parent 0de6915222
commit 2254444378

View File

@ -64,7 +64,10 @@ class TelegramDownloadHelper(DownloadHelper):
def __onDownloadError(self, error):
with global_lock:
GLOBAL_GID.remove(self.gid)
try:
GLOBAL_GID.remove(self.gid)
except KeyError:
pass
self.__listener.onDownloadError(error)
def __onDownloadComplete(self):