From 57006259f14bb56a358e66ac0dec50f8863d53d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Wed, 23 Nov 2022 23:02:34 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Add=20get=20icon=20exception=20h?= =?UTF-8?q?andling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/system/inline.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/system/inline.py b/plugins/system/inline.py index 7bc2f227..c6b23306 100644 --- a/plugins/system/inline.py +++ b/plugins/system/inline.py @@ -38,6 +38,9 @@ class Inline(Plugin): icon = await self.assets_service.weapon(weapons_name).get_link("icon") except AssetsCouldNotFound: continue + except Exception as exc: + logger.error("获取武器信息失败 %s", str(exc)) + continue data = {"name": weapons_name, "icon": icon} self.weapons_list.append(data) logger.success("Inline 模块获取武器列表成功") @@ -50,6 +53,9 @@ class Inline(Plugin): icon = await self.assets_service.avatar(character_name).get_link("icon") except AssetsCouldNotFound: continue + except Exception as exc: + logger.error("获取角色信息失败 %s", str(exc)) + continue data = {"name": character_name, "icon": icon} self.characters_list.append(data) logger.success("Inline 模块获取角色列表成功")