修复PR version_check return None问题
This commit is contained in:
parent
03611dbd8f
commit
60db1e7aa4
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue