From 8c126ef8e3c310bc5a08e0da112b6677579bae01 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 13 Jun 2017 16:02:31 +0200 Subject: [PATCH] Catch the right error when the constraint type name is not set; --- flatisfy/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/flatisfy/config.py b/flatisfy/config.py index 55ad87f..c51c61f 100644 --- a/flatisfy/config.py +++ b/flatisfy/config.py @@ -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"]