comparison piecrust/importing/jekyll.py @ 1164:727110ea112a

core: Remove more YAML deprecation warnings.
author Ludovic Chabant <ludovic@chabant.com>
date Fri, 04 Oct 2019 08:48:07 -0700
parents 28b021be74eb
children
comparison
equal deleted inserted replaced
1163:ed308313bcda 1164:727110ea112a
45 self.convertStatic(app, full_fn, rel_fn) 45 self.convertStatic(app, full_fn, rel_fn)
46 46
47 def convertConfig(self, app, src_path): 47 def convertConfig(self, app, src_path):
48 logger.debug(" Converting configuration file.") 48 logger.debug(" Converting configuration file.")
49 with open(src_path, 'r', encoding='utf8') as fp: 49 with open(src_path, 'r', encoding='utf8') as fp:
50 config = yaml.load(fp) 50 config = yaml.safe_load(fp)
51 51
52 if 'site' not in config: 52 if 'site' not in config:
53 config['site'] = {} 53 config['site'] = {}
54 config['site']['related_posts'] = [] 54 config['site']['related_posts'] = []
55 config['site']['posts_fs'] = 'flat' 55 config['site']['posts_fs'] = 'flat'