From e9eb00a0d42900d79f7ac6096df378290570f548 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Thu, 3 Apr 2025 16:18:54 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E6=8F=92=E4=BB=B6=E5=B8=82?= =?UTF-8?q?=E5=9C=BA=E5=B8=AE=E5=8A=A9=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/core_lifecycle.py | 1 - astrbot/core/star/star_manager.py | 2 +- astrbot/core/utils/io.py | 4 +- dashboard/src/views/ExtensionMarketplace.vue | 64 +++++++++++--------- 4 files changed, 37 insertions(+), 34 deletions(-) diff --git a/astrbot/core/core_lifecycle.py b/astrbot/core/core_lifecycle.py index f0e8e214..ee40187f 100644 --- a/astrbot/core/core_lifecycle.py +++ b/astrbot/core/core_lifecycle.py @@ -190,7 +190,6 @@ class AstrBotCoreLifecycle: task.cancel() for plugin in self.plugin_manager.context.get_all_stars(): - logger.info(f"正在终止插件 {plugin.name} ...") try: await self.plugin_manager._terminate_plugin(plugin) except Exception as e: diff --git a/astrbot/core/star/star_manager.py b/astrbot/core/star/star_manager.py index 75a18317..2d610f15 100644 --- a/astrbot/core/star/star_manager.py +++ b/astrbot/core/star/star_manager.py @@ -596,7 +596,7 @@ class PluginManager: asyncio.get_event_loop().run_in_executor( None, star_metadata.star_cls.__del__ ) - else: + elif hasattr(star_metadata.star_cls, "terminate"): await star_metadata.star_cls.terminate() async def turn_on_plugin(self, plugin_name: str): diff --git a/astrbot/core/utils/io.py b/astrbot/core/utils/io.py index c996cadb..5bd5d7c7 100644 --- a/astrbot/core/utils/io.py +++ b/astrbot/core/utils/io.py @@ -103,7 +103,7 @@ async def download_image_by_url( with open(path, "wb") as f: f.write(await resp.read()) return path - except aiohttp.client.ClientConnectorSSLError: + except (aiohttp.ClientConnectorSSLError, aiohttp.ClientConnectorCertificateError): # 关闭SSL验证 ssl_context = ssl.create_default_context() ssl_context.set_ciphers("DEFAULT") @@ -152,7 +152,7 @@ async def download_file(url: str, path: str, show_progress: bool = False): f"\r下载进度: {downloaded_size / total_size:.2%} 速度: {speed:.2f} KB/s", end="", ) - except aiohttp.client.ClientConnectorSSLError: + except (aiohttp.ClientConnectorSSLError, aiohttp.ClientConnectorCertificateError): # 关闭SSL验证 ssl_context = ssl.create_default_context() ssl_context.set_ciphers("DEFAULT") diff --git a/dashboard/src/views/ExtensionMarketplace.vue b/dashboard/src/views/ExtensionMarketplace.vue index 9e8587a6..6fbce072 100644 --- a/dashboard/src/views/ExtensionMarketplace.vue +++ b/dashboard/src/views/ExtensionMarketplace.vue @@ -63,14 +63,13 @@ import 'highlight.js/styles/github.css'; - +
{{ readmeDialog.error }}