1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 19:01:15 +01:00
workload-automation/wa/framework/target/config.py

21 lines
517 B
Python
Raw Normal View History

2017-02-21 13:51:12 +00:00
from copy import copy
#Not going to be used for now.
class TargetConfig(dict):
"""
Represents a configuration for a target.
"""
def __init__(self, config=None):
if isinstance(config, TargetConfig):
self.__dict__ = copy(config.__dict__)
elif hasattr(config, 'iteritems'):
for k, v in config.iteritems:
self.set(k, v)
elif config:
raise ValueError(config)
def set(self, name, value):
setattr(self, name, value)