Handle KeyError exception in Telegram download error
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
This commit is contained in:
parent
0de6915222
commit
2254444378
|
|
@ -64,7 +64,10 @@ class TelegramDownloadHelper(DownloadHelper):
|
||||||
|
|
||||||
def __onDownloadError(self, error):
|
def __onDownloadError(self, error):
|
||||||
with global_lock:
|
with global_lock:
|
||||||
GLOBAL_GID.remove(self.gid)
|
try:
|
||||||
|
GLOBAL_GID.remove(self.gid)
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
self.__listener.onDownloadError(error)
|
self.__listener.onDownloadError(error)
|
||||||
|
|
||||||
def __onDownloadComplete(self):
|
def __onDownloadComplete(self):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue