perf: 优化插件卸载逻辑

This commit is contained in:
Soulter
2023-05-13 13:28:18 +08:00
parent 86eda7bdf8
commit 0d23c0900b
+2
View File
@@ -106,6 +106,8 @@ class Command:
elif l[1] == "d":
try:
os.remove(os.path.join(ppath, l[2]))
if l[2] in self.cached_plugins:
del self.cached_plugins[l[2]]
return True, "插件卸载成功~", "plugin"
except BaseException as e:
return False, f"卸载插件失败,原因: {str(e)}", "plugin"