修复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:
|
except Exception as e:
|
||||||
log.warn(f"load moudle [{pkg_name}] failed: {e}")
|
log.warn(f"load moudle [{pkg_name}] failed: {e}")
|
||||||
return 7
|
return 7
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
def file_check(file_json: dict, pkg_name: str) -> int:
|
def file_check(file_json: dict, pkg_name: str) -> int:
|
||||||
|
@ -86,7 +87,7 @@ def load_package(pkg_name: str) -> int:
|
||||||
return 1
|
return 1
|
||||||
try:
|
try:
|
||||||
with open(pkg_path+"/"+"manifest.json", "r", encoding="utf-8") as file:
|
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:
|
except json.decoder.JSONDecodeError:
|
||||||
log.warn(f"load moudle [{pkg_name}] failed: " +
|
log.warn(f"load moudle [{pkg_name}] failed: " +
|
||||||
"Json syntax error")
|
"Json syntax error")
|
||||||
|
@ -159,7 +160,6 @@ def load_package(pkg_name: str) -> int:
|
||||||
pkg_path+"/"+i["from"], data_dir+"/"+i["to"])
|
pkg_path+"/"+i["from"], data_dir+"/"+i["to"])
|
||||||
|
|
||||||
add_action_head = False
|
add_action_head = False
|
||||||
|
|
||||||
if "load" in file_json:
|
if "load" in file_json:
|
||||||
open_symlink = config.USE_SYMLINK
|
open_symlink = config.USE_SYMLINK
|
||||||
if "symlink" in file_json["load"] and file_json["load"] == False:
|
if "symlink" in file_json["load"] and file_json["load"] == False:
|
||||||
|
|
Loading…
Reference in New Issue