From 42e8b5bd79e0a109d846bfb00ae7b95913c7bbe2 Mon Sep 17 00:00:00 2001 From: hldh214 Date: Wed, 17 Apr 2024 11:09:36 +0900 Subject: [PATCH] Replace TimeoutError with RPCError in telegram.py The TimeoutError from the telethon.errors.rpcerrorlist has been replaced with RPCError from telethon.errors.rpcbaseerrors in the telegram.py file. This change is intended to catch a broader range of RPC-related exceptions during the upload process. Signed-off-by: hldh214 --- recorder/destination/telegram.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recorder/destination/telegram.py b/recorder/destination/telegram.py index 705fa13..979b753 100644 --- a/recorder/destination/telegram.py +++ b/recorder/destination/telegram.py @@ -31,7 +31,7 @@ def progress(current, total, pbar, action=None): reraise=True, retry=tenacity.retry_if_exception_type(( RuntimeError, - telethon.errors.rpcerrorlist.TimeoutError, + telethon.errors.rpcbaseerrors.RPCError, )) ) def upload(self, path, title):