diff options
author | James Williams <james@kananlabs.org> | 2022-12-29 17:33:56 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-29 15:33:56 -0800 |
commit | b49d11867ab6bd7219c5b2c50f610e7829395975 (patch) | |
tree | a674bb40db2862aeafdc3abb929c72b1ed16c450 /src | |
parent | c83819262b4b739899af8a0bd7b6f32442344e4a (diff) | |
download | tox-git-b49d11867ab6bd7219c5b2c50f610e7829395975.tar.gz |
Fix logging error with emoji in git branch name. (#2790)
Resolves https://github.com/tox-dev/tox/issues/2768
Diffstat (limited to 'src')
-rw-r--r-- | src/tox/pytest.py | 2 | ||||
-rw-r--r-- | src/tox/tox_env/api.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/tox/pytest.py b/src/tox/pytest.py index 21cd816a..ae211252 100644 --- a/src/tox/pytest.py +++ b/src/tox/pytest.py @@ -161,7 +161,7 @@ class ToxProject: at_path.mkdir(exist_ok=True) ToxProject._setup_files(at_path, None, value) elif isinstance(value, str): - at_path.write_text(textwrap.dedent(value)) + at_path.write_text(textwrap.dedent(value), encoding="utf-8") elif value is None: at_path.mkdir() else: diff --git a/src/tox/tox_env/api.py b/src/tox/tox_env/api.py index 98c4501a..3ce15b99 100644 --- a/src/tox/tox_env/api.py +++ b/src/tox/tox_env/api.py @@ -444,7 +444,7 @@ class ToxEnv(ABC): @staticmethod def _write_execute_log(env_name: str, log_file: Path, request: ExecuteRequest, status: ExecuteStatus) -> None: - with log_file.open("wt") as file: + with log_file.open("wt", encoding="utf-8") as file: file.write(f"name: {env_name}\n") file.write(f"run_id: {request.run_id}\n") for env_key, env_value in request.env.items(): |