Show a warning if 'optional' critera for argument ain't a bool

This commit is contained in:
Alexandre Aubin 2019-03-27 14:52:10 +01:00
parent 9181e08814
commit 3664802f29

View file

@ -386,6 +386,9 @@ class App():
recognized_types = ("domain", "path", "boolean", "app", "password", "user", "string")
for argument in manifest["arguments"]["install"]:
if "optional" in argument.keys():
if not isinstance(argument["optional"], bool):
print_warning("The key 'optional' value for setting %s should be a boolean (true or false)" % argument["name"])
if "type" not in argument.keys():
print_warning(
"[YEP-2.1] You should specify the type of the argument '%s'. "