Merge branch 'fix/chore-fix' into dev/plugin-deploy

This commit is contained in:
Yeuoly 2024-12-02 21:26:12 +08:00
commit dbc555f698
No known key found for this signature in database
GPG Key ID: A66E7E320FB19F61
1 changed files with 7 additions and 0 deletions

View File

@ -100,6 +100,13 @@ class ToolManager:
"""
get the plugin provider
"""
# check if context is set
try:
contexts.plugin_tool_providers.get()
except LookupError:
contexts.plugin_tool_providers.set({})
contexts.plugin_tool_providers_lock.set(Lock())
with contexts.plugin_tool_providers_lock.get():
plugin_tool_providers = contexts.plugin_tool_providers.get()
if provider in plugin_tool_providers: