Skip to content

Commit

Permalink
v2.5.20: 修复下载图片失败的异常处理 (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
hect0x7 authored Sep 18, 2024
1 parent c50ca79 commit 9c986b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/jmcomic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# 被依赖方 <--- 使用方
# config <--- entity <--- toolkit <--- client <--- option <--- downloader

__version__ = '2.5.19'
__version__ = '2.5.20'

from .api import *
from .jm_plugin import *
Expand Down
5 changes: 1 addition & 4 deletions src/jmcomic/jm_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ def download_by_image_detail(self, image: JmImageDetail, client: JmcomicClient):
if use_cache is True and image.exists:
return

e = None
try:
client.download_by_image_detail(
image,
Expand All @@ -121,9 +120,7 @@ def download_by_image_detail(self, image: JmImageDetail, client: JmcomicClient):
jm_log('image.failed', f'图片下载失败: [{image.download_url}], 异常: {e}')
# 保存失败记录
self.download_failed_list.append((image, e))

if e is not None:
raise e
raise

self.after_image(image, img_save_path)

Expand Down

0 comments on commit 9c986b3

Please sign in to comment.