[enh] manifest: 'multi_instance' key are now boolean values type.

This commit is contained in:
Moul 2016-04-28 19:31:33 +02:00
parent f66e1e3cc1
commit 90b77f8094

View file

@ -75,8 +75,8 @@ def check_manifest(manifest):
if "license" in manifest and manifest["license"] != "free" and manifest["license"] != "non-free": if "license" in manifest and manifest["license"] != "free" and manifest["license"] != "non-free":
print_wrong("You should specify 'free' or 'non-free' software package in the license field.") print_wrong("You should specify 'free' or 'non-free' software package in the license field.")
elif "license" in manifest: print_right("'licence' key value is good.") elif "license" in manifest: print_right("'licence' key value is good.")
if "multi_instance" in manifest and manifest["multi_instance"] != "true" and manifest["multi_instance"] != "false": if "multi_instance" in manifest and manifest["multi_instance"] != 1 and manifest["multi_instance"] != 0:
print_wrong("multi_instance field must use 'true' or 'false' value."); print_wrong("multi_instance field must be boolean type values 'true' or 'false' and not string type.");
if "services" in manifest: if "services" in manifest:
services = ("nginx", "php5-fpm", "mysql", "uwsgi", "metronome", "postfix", "dovecot") #, "rspamd", "rmilter") services = ("nginx", "php5-fpm", "mysql", "uwsgi", "metronome", "postfix", "dovecot") #, "rspamd", "rmilter")
i = 0 i = 0