1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-18 20:11:20 +00:00

RuntimeConfig: Makes setter_params optional

Now setter_params are optional when creating a Runtime Parameter to
allow them to be used for more purposes which don't require additional
settings.
This commit is contained in:
Marc Bonnici 2017-07-26 11:49:34 +01:00
parent 06be73f8e1
commit bbfb802c00

View File

@ -14,10 +14,10 @@ logger = logging.getLogger('RuntimeConfig')
class RuntimeParameter(Parameter):
def __init__(self, name, setter, setter_params, **kwargs):
def __init__(self, name, setter, setter_params=None, **kwargs):
super(RuntimeParameter, self).__init__(name, **kwargs)
self.setter = setter
self.setter_params = setter_params
self.setter_params = setter_params or {}
def set(self, obj, value):
self.validate_value(self.name, value)