From 6e0cb73a4e549d2b28ef864c6ddb732d6347e9ad Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Fri, 6 Oct 2017 12:52:12 +0100 Subject: [PATCH] framework/config: make LoggingConfig serializable --- wa/framework/configuration/core.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wa/framework/configuration/core.py b/wa/framework/configuration/core.py index 8db5d553..899f4601 100644 --- a/wa/framework/configuration/core.py +++ b/wa/framework/configuration/core.py @@ -118,6 +118,10 @@ class LoggingConfig(dict): 'color': True, } + @staticmethod + def from_pod(pod): + return LoggingConfig(pod) + def __init__(self, config=None): dict.__init__(self) if isinstance(config, dict): @@ -136,6 +140,9 @@ class LoggingConfig(dict): else: raise ValueError(config) + def to_pod(self): + return self + def get_type_name(kind): typename = str(kind)