[enh] do not throw an error if 'backup' or 'restore script is missing.

This commit is contained in:
Moul 2017-04-11 09:44:13 +02:00
parent fdda64aaf7
commit 64f9360d80

View file

@ -37,6 +37,7 @@ def print_wrong(str):
def check_files_exist(app_path):
"""
Check files exist
'backup' and 'restore' scripts are mandatory
"""
return_code = 0
@ -44,12 +45,13 @@ def check_files_exist(app_path):
fnames = ("manifest.json", "scripts/install", "scripts/remove",
"scripts/upgrade", "scripts/backup", "scripts/restore", "LICENSE", "README.md")
for fname in fnames:
for nbr, fname in enumerate(fnames):
if check_file_exist(app_path + "/" + fname):
print_right(fname)
else:
print_wrong(fname)
return_code = 1
if nbr != 4 and nbr != 5:
return_code = 1
return return_code