Skip to content

Commit 83740c3

Browse files
committed
[修复] 修复update时没有对应仓库时的错误.
1 parent 255bb9f commit 83740c3

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

buildpkg.exe

3.19 KB
Binary file not shown.

buildpkg.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,14 @@ def _save_package_config(filename, config):
203203
def _load_package_config(filename):
204204
# 1. check if "filename" file exists
205205
if os.path.exists(filename) == False:
206-
return False
206+
return None
207207

208208
# 2. check that "filename" is illegal, Waiting for user processing
209209
try:
210210
with open(filename, 'r') as file:
211211
json.load(file)
212212
except ValueError:
213-
return False
213+
return None
214214

215215
# 3. load package config
216216
with open(filename, 'r') as file:
@@ -471,6 +471,10 @@ def _update_package(pkgname, version = None, license = None):
471471
_package_config_path = os.path.join(_buildpkg_packages_path, pkgname, "config.json")
472472
_package_config = _load_package_config(_package_config_path)
473473

474+
if _package_config == None:
475+
_run_log.error("The [%s] package was not found, exit buildpkg update." % (pkgname))
476+
exit(1)
477+
474478
_replace_list = {
475479
"username" : _config["username"],
476480
"pkgname" : _package_config["pkgname"],

0 commit comments

Comments
 (0)