Skip to content

Commit 9c986b3

Browse files
authored
v2.5.20: 修复下载图片失败的异常处理 (#284)
1 parent c50ca79 commit 9c986b3

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/jmcomic/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# 被依赖方 <--- 使用方
33
# config <--- entity <--- toolkit <--- client <--- option <--- downloader
44

5-
__version__ = '2.5.19'
5+
__version__ = '2.5.20'
66

77
from .api import *
88
from .jm_plugin import *

src/jmcomic/jm_downloader.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ def download_by_image_detail(self, image: JmImageDetail, client: JmcomicClient):
110110
if use_cache is True and image.exists:
111111
return
112112

113-
e = None
114113
try:
115114
client.download_by_image_detail(
116115
image,
@@ -121,9 +120,7 @@ def download_by_image_detail(self, image: JmImageDetail, client: JmcomicClient):
121120
jm_log('image.failed', f'图片下载失败: [{image.download_url}], 异常: {e}')
122121
# 保存失败记录
123122
self.download_failed_list.append((image, e))
124-
125-
if e is not None:
126-
raise e
123+
raise
127124

128125
self.after_image(image, img_save_path)
129126

0 commit comments

Comments
 (0)