def check_config(cfg):
"""Resolve root in config file, then validate paths."""
if 'root' in cfg['all']:
root = verify(cfg['all']['root'])
else:
root = Path.cwd()
# Iteratively check paths for each subsection
new_cfg = dict()
for section, values in cfg.items():
new_cfg[section] = validate_paths(values, root)
return new_cfg
评论列表
文章目录