mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
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:
@@ -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)]),
|
||||
|
Reference in New Issue
Block a user