mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-02-17 16:20:05 +08:00
🐛 fix load error
This commit is contained in:
parent
0235af770f
commit
0eadf5f4e9
@ -179,7 +179,8 @@ class PluginFinder(MetaPathFinder):
|
||||
newname = manager._rewrite_module_name(fullname)
|
||||
if newname:
|
||||
spec = PathFinder.find_spec(
|
||||
newname, [*manager.search_path, *(path or [])], target)
|
||||
newname, [*manager.search_path, *(path or sys.path)],
|
||||
target)
|
||||
if spec:
|
||||
spec.loader = PluginLoader(manager, newname,
|
||||
spec.origin)
|
||||
|
Loading…
x
Reference in New Issue
Block a user