From a5c54e278935848d7c2034dffced66de81bd878d Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Wed, 24 Nov 2021 17:55:01 +0900 Subject: [PATCH] Fix EncodingWarning in Tools/freeze/test/freeze.py --- Tools/freeze/test/freeze.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/freeze/test/freeze.py b/Tools/freeze/test/freeze.py index db2aa3101d8790..abedac03f91b04 100644 --- a/Tools/freeze/test/freeze.py +++ b/Tools/freeze/test/freeze.py @@ -89,7 +89,7 @@ def get_makefile_var(builddir, name): regex = re.compile(rf'^{name} *=\s*(.*?)\s*$') filename = os.path.join(builddir, 'Makefile') try: - infile = open(filename) + infile = open(filename, encoding='utf-8') except FileNotFoundError: return None with infile: @@ -125,7 +125,7 @@ def prepare(script=None, outdir=None): if script: scriptfile = os.path.join(outdir, 'app.py') print(f'creating the script to be frozen at {scriptfile}') - with open(scriptfile, 'w') as outfile: + with open(scriptfile, 'w', encoding='utf-8') as outfile: outfile.write(script) # Make a copy of the repo to avoid affecting the current build pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy