From ac613b58390668f18e6d8d86d65f7bc7791dd8dd Mon Sep 17 00:00:00 2001 From: yanyongyu Date: Sat, 6 Mar 2021 22:25:50 +0800 Subject: [PATCH] :bug: fix subplugin detect bug --- nonebot/plugin/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nonebot/plugin/manager.py b/nonebot/plugin/manager.py index a184d956..5965d02b 100644 --- a/nonebot/plugin/manager.py +++ b/nonebot/plugin/manager.py @@ -88,7 +88,7 @@ class PluginManager: if hasattr(_internal_space, internal_id): raise RuntimeError("Plugin manager already exists!") - prefix = sys._getframe(2).f_globals.get( + prefix = sys._getframe(3).f_globals.get( "__name__") or _internal_space.__name__ if not prefix.startswith(_internal_space.__name__): prefix = _internal_space.__name__