Skip to content

Commit

Permalink
fix: 修复更新、卸载插件时的报错
Browse files Browse the repository at this point in the history
  • Loading branch information
Soulter committed Jul 30, 2024
1 parent d57fd0f commit e77b701
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions model/plugin/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def get_registered_plugin(self, plugin_name: str) -> RegisteredPlugin:
return p

def uninstall_plugin(self, plugin_name: str):
plugin = self.get_registered_plugin(plugin_name, self.context.cached_plugins)
plugin = self.get_registered_plugin(plugin_name)
if not plugin:
raise Exception("插件不存在。")
root_dir_name = plugin.root_dir_name
Expand All @@ -133,7 +133,7 @@ def uninstall_plugin(self, plugin_name: str):
raise Exception("移除插件成功,但是删除插件文件夹失败。您可以手动删除该文件夹,位于 addons/plugins/ 下。")

def update_plugin(self, plugin_name: str):
plugin = self.get_registered_plugin(plugin_name, self.context.cached_plugins)
plugin = self.get_registered_plugin(plugin_name)
if not plugin:
raise Exception("插件不存在。")

Expand Down

0 comments on commit e77b701

Please sign in to comment.