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 /mesonbuild/mesonlib/universal.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 'mesonbuild/mesonlib/universal.py')
-rw-r--r-- | mesonbuild/mesonlib/universal.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/mesonlib/universal.py b/mesonbuild/mesonlib/universal.py index 0ed99a5..c500e15 100644 --- a/mesonbuild/mesonlib/universal.py +++ b/mesonbuild/mesonlib/universal.py @@ -1359,7 +1359,7 @@ def expand_arguments(args: T.Iterable[str]) -> T.Optional[T.List[str]]: args_file = arg[1:] try: - with open(args_file) as f: + with open(args_file, encoding='utf-8') as f: extended_args = f.read().split() expended_args += extended_args except Exception as e: @@ -1854,11 +1854,11 @@ def get_wine_shortpath(winecmd: T.List[str], wine_paths: T.Sequence[str]) -> str wine_paths = list(OrderedSet(wine_paths)) getShortPathScript = '%s.bat' % str(uuid.uuid4()).lower()[:5] - with open(getShortPathScript, mode='w') as f: + with open(getShortPathScript, mode='w', encoding='utf-8') as f: f.write("@ECHO OFF\nfor %%x in (%*) do (\n echo|set /p=;%~sx\n)\n") f.flush() try: - with open(os.devnull, 'w') as stderr: + with open(os.devnull, 'w', encoding='utf-8') as stderr: wine_path = subprocess.check_output( winecmd + ['cmd', '/C', getShortPathScript] + wine_paths, |