From 60db1e7aa450de3bece2d6f8842697555aa23d59 Mon Sep 17 00:00:00 2001 From: cxykevin Date: Sat, 10 Feb 2024 22:01:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DPR=20version=5Fcheck=20return?= =?UTF-8?q?=20None=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/loader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/loader.py b/src/loader.py index ed599f6..ef85c87 100644 --- a/src/loader.py +++ b/src/loader.py @@ -53,6 +53,7 @@ def version_check(configuration: dict, pkg_name: str) -> int: except Exception as e: log.warn(f"load moudle [{pkg_name}] failed: {e}") return 7 + return 0 def file_check(file_json: dict, pkg_name: str) -> int: @@ -86,7 +87,7 @@ def load_package(pkg_name: str) -> int: return 1 try: with open(pkg_path+"/"+"manifest.json", "r", encoding="utf-8") as file: - file_json = json.load(json.decoder.JSONDecodeError) + file_json = json.load(file) except json.decoder.JSONDecodeError: log.warn(f"load moudle [{pkg_name}] failed: " + "Json syntax error") @@ -159,7 +160,6 @@ def load_package(pkg_name: str) -> int: pkg_path+"/"+i["from"], data_dir+"/"+i["to"]) add_action_head = False - if "load" in file_json: open_symlink = config.USE_SYMLINK if "symlink" in file_json["load"] and file_json["load"] == False: