Merge branch 'config-check' into 'master'
Catch the right error when the constraint type name is not set See merge request !2
This commit is contained in:
commit
577abafa07
@ -95,6 +95,7 @@ def validate_config(config):
|
|||||||
# message in the log output.
|
# message in the log output.
|
||||||
# pylint: disable=locally-disabled,line-too-long
|
# pylint: disable=locally-disabled,line-too-long
|
||||||
assert "type" in config["constraints"]
|
assert "type" in config["constraints"]
|
||||||
|
assert isinstance(config["constraints"]["type"], (str, unicode))
|
||||||
assert config["constraints"]["type"].upper() in ["RENT",
|
assert config["constraints"]["type"].upper() in ["RENT",
|
||||||
"SALE", "SHARING"]
|
"SALE", "SHARING"]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user