diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2021-06-29 20:52:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-29 20:52:55 +0300 |
commit | 4bfee181c5a166e3d429bd265e06d299dce50f30 (patch) | |
tree | 8918a0e09f668ed55748ec254c51b4d92b5403a9 /tools/dircondenser.py | |
parent | 81ca0ec7ae975723b8b399b9f142286895a45dab (diff) | |
parent | c0a2025d038a08092212bfc45e7bbb46ff1e8e52 (diff) | |
download | meson-4bfee181c5a166e3d429bd265e06d299dce50f30.zip meson-4bfee181c5a166e3d429bd265e06d299dce50f30.tar.gz meson-4bfee181c5a166e3d429bd265e06d299dce50f30.tar.bz2 |
Merge pull request #8918 from mensinda/pathlibFixes
pathlib: Patch pathlib to work around some bugs (fixes #8263 #7295)
Diffstat (limited to 'tools/dircondenser.py')
-rwxr-xr-x | tools/dircondenser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/dircondenser.py b/tools/dircondenser.py index 9d642d2..2a726df 100755 --- a/tools/dircondenser.py +++ b/tools/dircondenser.py @@ -54,11 +54,11 @@ def get_entries() -> T.List[T.Tuple[int, str]]: return entries def replace_source(sourcefile: str, replacements: T.List[T.Tuple[str, str]]) -> None: - with open(sourcefile) as f: + with open(sourcefile, encoding='utf-8') as f: contents = f.read() for old_name, new_name in replacements: contents = contents.replace(old_name, new_name) - with open(sourcefile, 'w') as f: + with open(sourcefile, 'w', encoding='utf-8') as f: f.write(contents) def condense(dirname: str) -> None: |