comparison piecrust/processing/sitemap.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 45ad976712ec
children
comparison
equal deleted inserted replaced
1163:ed308313bcda 1164:727110ea112a
34 def onPipelineStart(self, ctx): 34 def onPipelineStart(self, ctx):
35 self._start_time = time.time() 35 self._start_time = time.time()
36 36
37 def _doProcess(self, in_path, out_path): 37 def _doProcess(self, in_path, out_path):
38 with open(in_path, 'r') as fp: 38 with open(in_path, 'r') as fp:
39 sitemap = yaml.load(fp) 39 sitemap = yaml.safe_load(fp)
40 40
41 try: 41 try:
42 with open(out_path, 'w') as fp: 42 with open(out_path, 'w') as fp:
43 fp.write(SITEMAP_HEADER) 43 fp.write(SITEMAP_HEADER)
44 self._writeManualLocs(sitemap, fp) 44 self._writeManualLocs(sitemap, fp)