mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-21 12:28:44 +00:00
ConfigurationPoint: Now validates the default value
This commit is contained in:
parent
9cc42c1879
commit
22888b502f
@ -222,6 +222,12 @@ class ConfigurationPoint(object):
|
|||||||
self.merge = merge
|
self.merge = merge
|
||||||
self.aliases = aliases or []
|
self.aliases = aliases or []
|
||||||
|
|
||||||
|
if self.default is not None:
|
||||||
|
try:
|
||||||
|
self.validate_value("init", self.default)
|
||||||
|
except ConfigError:
|
||||||
|
raise ValueError('Default value "{}" is not valid'.format(self.default))
|
||||||
|
|
||||||
def match(self, name):
|
def match(self, name):
|
||||||
if name == self.name:
|
if name == self.name:
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user