mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-02 03:12:34 +01:00
framework/config: make LoggingConfig serializable
This commit is contained in:
@@ -118,6 +118,10 @@ class LoggingConfig(dict):
|
|||||||
'color': True,
|
'color': True,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def from_pod(pod):
|
||||||
|
return LoggingConfig(pod)
|
||||||
|
|
||||||
def __init__(self, config=None):
|
def __init__(self, config=None):
|
||||||
dict.__init__(self)
|
dict.__init__(self)
|
||||||
if isinstance(config, dict):
|
if isinstance(config, dict):
|
||||||
@@ -136,6 +140,9 @@ class LoggingConfig(dict):
|
|||||||
else:
|
else:
|
||||||
raise ValueError(config)
|
raise ValueError(config)
|
||||||
|
|
||||||
|
def to_pod(self):
|
||||||
|
return self
|
||||||
|
|
||||||
|
|
||||||
def get_type_name(kind):
|
def get_type_name(kind):
|
||||||
typename = str(kind)
|
typename = str(kind)
|
||||||
|
Reference in New Issue
Block a user