Fix some open calls were not being made through pathlib

This was causing the documentation to fail to build under Python 3.5.
This commit is contained in:
Lonami Exo
2019-01-06 21:36:32 +01:00
parent e565552ae9
commit b57e3e3e0a
3 changed files with 3 additions and 3 deletions

View File

@@ -196,7 +196,7 @@ def _get_description(arg):
def _copy_replace(src, dst, replacements):
"""Copies the src file into dst applying the replacements dict"""
with open(src, 'r') as infile, open(dst, 'w') as outfile:
with src.open() as infile, dst.open('w') as outfile:
outfile.write(re.sub(
'|'.join(re.escape(k) for k in replacements),
lambda m: str(replacements[m.group(0)]),