mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 10:11:17 +00:00
framework/config: make LoggingConfig serializable
This commit is contained in:
parent
cd328c9a50
commit
6e0cb73a4e
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user