mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
🚀 增加资源下载失败异常处理及提示信息
This commit is contained in:
parent
603ad5bc8b
commit
ec6ad1408e
@ -70,6 +70,10 @@ class ResourceManager:
|
|||||||
url = await repo_info.get_archive_download_urls()
|
url = await repo_info.get_archive_download_urls()
|
||||||
logger.debug("开始下载resources资源包...", CMD_STRING)
|
logger.debug("开始下载resources资源包...", CMD_STRING)
|
||||||
if not await AsyncHttpx.download_file(url, cls.ZIP_FILE, stream=True):
|
if not await AsyncHttpx.download_file(url, cls.ZIP_FILE, stream=True):
|
||||||
|
logger.error(
|
||||||
|
"下载resources资源包失败,请尝试重启重新下载或前往 "
|
||||||
|
"https://github.com/zhenxun-org/zhenxun-bot-resources 手动下载..."
|
||||||
|
)
|
||||||
raise DownloadResourceException("下载resources资源包失败...")
|
raise DownloadResourceException("下载resources资源包失败...")
|
||||||
logger.debug("下载resources资源文件压缩包完成...", CMD_STRING)
|
logger.debug("下载resources资源文件压缩包完成...", CMD_STRING)
|
||||||
tf = zipfile.ZipFile(cls.ZIP_FILE)
|
tf = zipfile.ZipFile(cls.ZIP_FILE)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user