Browse Source

Catch the right error when the constraint type name is not set;

merge-requests/2/head
Benjamin Bouvier 5 years ago
parent
commit
8c126ef8e3
  1. 1
      flatisfy/config.py

1
flatisfy/config.py

@ -95,6 +95,7 @@ def validate_config(config): @@ -95,6 +95,7 @@ def validate_config(config):
# message in the log output.
# pylint: disable=locally-disabled,line-too-long
assert "type" in config["constraints"]
assert isinstance(config["constraints"]["type"], (str, unicode))
assert config["constraints"]["type"].upper() in ["RENT",
"SALE", "SHARING"]

Loading…
Cancel
Save