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: