From 2952b1c6289cee95d230a9d23ac8a1777ea3fbfe Mon Sep 17 00:00:00 2001 From: yodhcn <47470844+yodhcn@users.noreply.github.com> Date: Tue, 8 Oct 2024 10:48:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9C=AA=E7=9F=A5?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=AF=BC=E8=87=B4=E7=9A=84=E8=BD=AF=E4=BB=B6?= =?UTF-8?q?=E5=8D=A1=E6=AD=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 1a53e5b..e74d3f6 100644 --- a/main.py +++ b/main.py @@ -179,7 +179,11 @@ def run_renamer(self, root_path_list: list[str]): # 执行重命名 for root_path in root_path_list: - renamer.rename(root_path) + try: + renamer.rename(root_path) + except Exception as err: + Renamer.logger.error(f'[Unexpected exception] {str(err)}\n') + break self.__before_worker_thread_end()