Mercurial > piecrust2
changeset 1158:5762a0b821ac
core: Remove yaml deprecation warning.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 11 Jun 2019 16:40:11 -0700 |
parents | 40a40305c4e1 |
children | 6baa94da8b16 |
files | piecrust/processing/util.py piecrust/themes/base.py |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/piecrust/processing/util.py Tue Jun 11 15:14:20 2019 -0700 +++ b/piecrust/processing/util.py Tue Jun 11 16:40:11 2019 -0700 @@ -63,7 +63,7 @@ self._cache[path] = info with open(path, 'r') as fp: - config = yaml.load(fp) + config = yaml.load(fp, Loader=yaml.SafeLoader) info.files = config.get('files', []) info.delim = config.get('delim', "\n")
--- a/piecrust/themes/base.py Tue Jun 11 15:14:20 2019 -0700 +++ b/piecrust/themes/base.py Tue Jun 11 16:40:11 2019 -0700 @@ -25,7 +25,7 @@ # TODO: make configs and themes load together to speed this up. config_path = os.path.join(self.root_dir, CONFIG_PATH) with open(config_path, 'r', encoding='utf8') as fp: - config = yaml.load(fp.read()) + config = yaml.load(fp.read(), Loader=yaml.SafeLoader) if not config: return None site_config = config.get('site', {})