From 48e4f61d3d5389d8f8a7a5b6bd6d14fa48ca5915 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Wed, 16 Jun 2021 15:35:51 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fixed=20plugin=20update=20error.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🐛 修复 plugin update 命令错误。 --- pagermaid/modules/plugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pagermaid/modules/plugin.py b/pagermaid/modules/plugin.py index 700fd37..3882a40 100644 --- a/pagermaid/modules/plugin.py +++ b/pagermaid/modules/plugin.py @@ -21,11 +21,11 @@ def get_html(url): def remove_plugin(name): plugin_directory = f"{working_dir}/plugins/" try: - remove(f"{plugin_directory}{name}") + remove(f"{plugin_directory}{name}.py") except FileNotFoundError: pass try: - remove(f"{plugin_directory}{name}.disabled") + remove(f"{plugin_directory}{name}.py.disabled") except FileNotFoundError: pass @@ -118,7 +118,7 @@ async def plugin(context): temp = False break else: - remove_plugin(f'{i}.py') + remove_plugin(i) download(i) update_version(i, x['version']) success_list.append(i)