[Python-checkins] cpython (3.4): rstlint: explicitly open files as UTF8
zach.ware
python-checkins at python.org
Wed Jul 22 05:51:18 CEST 2015
https://hg.python.org/cpython/rev/256e71b48fbd
changeset: 96986:256e71b48fbd
branch: 3.4
parent: 96983:cf0011b6ebbd
user: Zachary Ware <zachary.ware at gmail.com>
date: Tue Jul 21 22:50:29 2015 -0500
summary:
rstlint: explicitly open files as UTF8
files:
Doc/tools/rstlint.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Doc/tools/rstlint.py b/Doc/tools/rstlint.py
--- a/Doc/tools/rstlint.py
+++ b/Doc/tools/rstlint.py
@@ -196,7 +196,7 @@
print('Checking %s...' % fn)
try:
- with open(fn, 'r') as f:
+ with open(fn, 'r', encoding='utf-8') as f:
lines = list(f)
except (IOError, OSError) as err:
print('%s: cannot open: %s' % (fn, err))
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list