aboutsummaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-07-04 01:25:55 +0200
committerVictor Stinner <victor.stinner@haypocalc.com>2011-07-04 01:25:55 +0200
commitbbdc08ea6e5d3f2d9058991a65b6011dfbb8d233 (patch)
tree1315eaeacd4a092e5ae452c1f74049d0d9903fb1 /Lib
parentnever retain a generator's caller's exception state on the generator after a ... (diff)
downloadcpython-bbdc08ea6e5d3f2d9058991a65b6011dfbb8d233.tar.gz
cpython-bbdc08ea6e5d3f2d9058991a65b6011dfbb8d233.tar.bz2
cpython-bbdc08ea6e5d3f2d9058991a65b6011dfbb8d233.zip
Issue #12451: xml.dom.pulldom: parse() now opens files in binary mode instead
of the text mode (using the locale encoding) to avoid encoding issues.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/xml/dom/pulldom.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/xml/dom/pulldom.py b/Lib/xml/dom/pulldom.py
index 81a36b073e8..d5ac8b2b984 100644
--- a/Lib/xml/dom/pulldom.py
+++ b/Lib/xml/dom/pulldom.py
@@ -326,7 +326,7 @@ def parse(stream_or_string, parser=None, bufsize=None):
if bufsize is None:
bufsize = default_bufsize
if isinstance(stream_or_string, str):
- stream = open(stream_or_string)
+ stream = open(stream_or_string, 'rb')
else:
stream = stream_or_string
if not parser: