summaryrefslogtreecommitdiffstats
path: root/Doc/tools/rstlint.py
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2015-07-22 03:50:29 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2015-07-22 03:50:29 (GMT)
commit4aa30dc27535bed8ffd16d37f8794d0a06bb0148 (patch)
tree2fdfd7349afd85afd37b4866b77d49a94a4ac112 /Doc/tools/rstlint.py
parentc75e2dd4c626561ce15ae0f4e24428ed0eb1855a (diff)
downloadcpython-4aa30dc27535bed8ffd16d37f8794d0a06bb0148.zip
cpython-4aa30dc27535bed8ffd16d37f8794d0a06bb0148.tar.gz
cpython-4aa30dc27535bed8ffd16d37f8794d0a06bb0148.tar.bz2
rstlint: explicitly open files as UTF8
Diffstat (limited to 'Doc/tools/rstlint.py')
-rwxr-xr-xDoc/tools/rstlint.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/tools/rstlint.py b/Doc/tools/rstlint.py
index be19ec8..7dccf72 100755
--- a/Doc/tools/rstlint.py
+++ b/Doc/tools/rstlint.py
@@ -196,7 +196,7 @@ Options: -v verbose (print all checked file names)
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))