Skip to content

Commit

Permalink
Specify encoding in util.byte_compile. Ref #232.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Mar 2, 2024
1 parent ba09295 commit f5bc9d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions distutils/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,9 @@ def byte_compile( # noqa: C901
log.info("writing byte-compilation script '%s'", script_name)
if not dry_run:
if script_fd is not None:
script = os.fdopen(script_fd, "w")
script = os.fdopen(script_fd, "w", encoding='utf-8')
else:
script = open(script_name, "w")
script = open(script_name, "w", encoding='utf-8')

with script:
script.write(
Expand Down

0 comments on commit f5bc9d2

Please sign in to comment.