mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-18 20:11:20 +00:00
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.
This commit is contained in:
parent
6e0cb73a4e
commit
7d9b6d6dd7
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user