🐛 修复检查资源下载失败时直接报错的问题

This commit is contained in:
CMHopeSunshine 2022-10-26 17:48:43 +08:00
parent 964b3343fd
commit 2bebb1266b
2 changed files with 2 additions and 1 deletions

View File

@ -97,7 +97,7 @@ async def check_resource():
save_path=file_path)
await asyncio.sleep(0.5)
except Exception as e:
logger.warning('资源检查', f'下载<m>{resource.split("/")[-1]}</m>时<r>出错: {e}</r>')
logger.warning('资源检查', f'下载<m>{resource["path"].split("/")[-1]}</m>时<r>出错: {e}</r>')
if flag:
logger.info('资源检查', '<g>资源下载完成</g>')
else:

View File

@ -27,6 +27,7 @@ operation_button = Flex(justify='center', items=[
),
ActionType.Ajax(
label='重启',
className='m-l',
api='/LittlePaimon/api/bot_restart',
confirmText='该操作将会使Bot重启在完成重启之前该页面也将无法访问也可能会弹出报错可无视请耐心等待重启',
level=LevelEnum.danger