1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-05 19:38:02 +00:00

fix error

This commit is contained in:
deadc0de6
2020-10-09 12:23:34 +02:00
parent 67493c81d2
commit a77b7d0a3b

View File

@@ -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]: