From 7d9b6d6dd7ea88bc5fedf779a5fa2a4a551f67f0 Mon Sep 17 00:00:00 2001
From: Sergei Trofimov <sergei.trofimov@arm.com>
Date: Fri, 6 Oct 2017 12:52:57 +0100
Subject: [PATCH] framework/config: ensure correct type for param defaults

Call self.kind() on the default value of a parameter before assigning it
to make sure that the assigned value is of correct type.
---
 wa/framework/configuration/core.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wa/framework/configuration/core.py b/wa/framework/configuration/core.py
index 899f4601..cfe5ea65 100644
--- a/wa/framework/configuration/core.py
+++ b/wa/framework/configuration/core.py
@@ -261,7 +261,7 @@ class ConfigurationPoint(object):
     def set_value(self, obj, value=None, check_mandatory=True):
         if value is None:
             if self.default is not None:
-                value = self.default
+                value = self.kind(self.default)
             elif check_mandatory and self.mandatory:
                 msg = 'No values specified for mandatory parameter "{}" in {}'
                 raise ConfigError(msg.format(self.name, obj.name))