summaryrefslogtreecommitdiffstats
path: root/Lib/site.py
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2015-10-01 10:27:57 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2015-10-01 10:27:57 (GMT)
commit2934fd66aec8c1802bcbb0d070c3bad9811d173e (patch)
tree34baff171438a51240a41f934c7405bebcef092f /Lib/site.py
parent0b40aab6f01289e9e6d4f656e23a48ca78e90752 (diff)
parentf223c53218fe76f333fce65f17fcaad5917d56d5 (diff)
downloadcpython-2934fd66aec8c1802bcbb0d070c3bad9811d173e.zip
cpython-2934fd66aec8c1802bcbb0d070c3bad9811d173e.tar.gz
cpython-2934fd66aec8c1802bcbb0d070c3bad9811d173e.tar.bz2
Closes #25185: merged fix from 3.4.
Diffstat (limited to 'Lib/site.py')
-rw-r--r--Lib/site.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/site.py b/Lib/site.py
index 6f66c07..3a8d1c3 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -465,7 +465,9 @@ def venv(known_paths):
config_line = re.compile(CONFIG_LINE)
virtual_conf = candidate_confs[0]
system_site = "true"
- with open(virtual_conf) as f:
+ # Issue 25185: Use UTF-8, as that's what the venv module uses when
+ # writing the file.
+ with open(virtual_conf, encoding='utf-8') as f:
for line in f:
line = line.strip()
m = config_line.match(line)