mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
[enh] Handle 'user' type for key name 'user' and 'admin'.
This commit is contained in:
parent
0d463a3794
commit
2c928736fb
1 changed files with 3 additions and 2 deletions
|
@ -85,14 +85,15 @@ def check_manifest(manifest):
|
||||||
print_wrong(manifest["services"][i] + " service doesn't exist")
|
print_wrong(manifest["services"][i] + " service doesn't exist")
|
||||||
i+=1
|
i+=1
|
||||||
if "install" in manifest["arguments"]:
|
if "install" in manifest["arguments"]:
|
||||||
types = ("domain", "path", "password")
|
types = ("user", "domain", "path", "password", "user", "admin")
|
||||||
i = 0
|
i = 0
|
||||||
while (i < len(types)):
|
while (i < len(types)):
|
||||||
j = 0
|
j = 0
|
||||||
while (j < len(manifest["arguments"]["install"])):
|
while (j < len(manifest["arguments"]["install"])):
|
||||||
if types[i] == manifest["arguments"]["install"][j]["name"]:
|
if types[i] == manifest["arguments"]["install"][j]["name"]:
|
||||||
if "type" not in manifest["arguments"]["install"][j]:
|
if "type" not in manifest["arguments"]["install"][j]:
|
||||||
print("You should specify " + types[i] + " type: \"type\": \"" + types[i] + "\",")
|
print("You should specify the type of the key with", end =" ")
|
||||||
|
print(types[i - 1]) if i == 5 else print(types[i])
|
||||||
j+=1
|
j+=1
|
||||||
i+=1
|
i+=1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue