Skip to content

Commit df2422c

Browse files
committed
【修改】:删除多余的提示信息,避免产生疑惑
1 parent 8ebf0e6 commit df2422c

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

cmds/cmd_package.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -578,22 +578,19 @@ def pre_package_update():
578578

579579
pkgs_fn = os.path.join(bsp_packages_path, 'pkgs.json')
580580

581+
# regenerate file : packages/pkgs.json
581582
if not os.path.exists(pkgs_fn):
582-
print ("Maybe you delete the file pkgs.json by mistake.")
583-
print ("Do you want to create a new pkgs.json ?")
584-
rc = raw_input('Press the Y Key to create a new pkgs.json.')
585-
if rc == 'y' or rc == 'Y':
586-
os.chdir(bsp_packages_path)
587-
fp = open("pkgs.json", 'w')
588-
fp.write("[]")
589-
fp.close()
590-
os.chdir(bsp_root)
591-
print ("Create a new file pkgs.json done.")
583+
os.chdir(bsp_packages_path)
584+
fp = open("pkgs.json", 'w')
585+
fp.write("[]")
586+
fp.close()
587+
os.chdir(bsp_root)
592588

593589
# Reading data back from pkgs.json
594590
with open(pkgs_fn, 'r') as f:
595591
oldpkgs = json.load(f)
596592

593+
# regenerate file : packages/pkgs_error.json
597594
pkgs_error_list_fn = os.path.join(
598595
bsp_packages_path, 'pkgs_error.json')
599596

@@ -603,7 +600,6 @@ def pre_package_update():
603600
fp.write("[]")
604601
fp.close()
605602
os.chdir(bsp_root)
606-
# print ("Create a new error file : pkgs_error.json.")
607603

608604
# Reading data back from pkgs_error.json
609605
with open(pkgs_error_list_fn, 'r') as f:

0 commit comments

Comments
 (0)