From a77b7d0a3b66199ce67a0a07e11b9e4f6e502329 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Fri, 9 Oct 2020 12:23:34 +0200 Subject: [PATCH] fix error --- dotdrop/cfg_yaml.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dotdrop/cfg_yaml.py b/dotdrop/cfg_yaml.py index 11bdaad..93dda10 100644 --- a/dotdrop/cfg_yaml.py +++ b/dotdrop/cfg_yaml.py @@ -998,7 +998,7 @@ class CfgYaml: content = self._yaml_load(path) except Exception as e: self._log.err(e) - raise YamlException('invalid config: {}'.format(path)) + raise YamlException('config format error: {}'.format(path)) return content def _yaml_load(self, path): @@ -1255,7 +1255,8 @@ class CfgYaml: """return copy of entry from yaml dictionary""" if key not in dic: if mandatory: - raise YamlException('invalid config: no {} found'.format(key)) + err = 'invalid config: no entry \"{}\" found'.format(key) + raise YamlException(err) dic[key] = {} return deepcopy(dic[key]) if mandatory and not dic[key]: