From: Philippe Proulx Date: Thu, 17 Mar 2016 22:07:51 +0000 (-0400) Subject: config: config object: null sets prop to default value X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=8823eb2465136e18f36bd295d97047b43c98c2fc;p=deliverable%2Fbarectf.git config: config object: null sets prop to default value Signed-off-by: Philippe Proulx --- diff --git a/barectf/config.py b/barectf/config.py index ce71260..794492e 100644 --- a/barectf/config.py +++ b/barectf/config.py @@ -2361,11 +2361,16 @@ class _YamlConfigParser: return version def _get_prefix(self, root): + def_prefix = 'barectf_' + if 'prefix' not in root: - return 'barectf_' + return def_prefix prefix_node = root['prefix'] + if prefix_node is None: + return def_prefix + if not _is_str_prop(prefix_node): raise ConfigError('"prefix" property (configuration) must be a string')