mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
openfile(): Go back to opening the files in text mode. This undoes
the change in revision 1.11 (test_email.py) in response to SF bug #609988. We now think that was the wrong fix and that WinZip was the real culprit there.
This commit is contained in:
parent
487fe6ac39
commit
08c82b8086
2 changed files with 2 additions and 2 deletions
|
@ -46,7 +46,7 @@ warnings.filterwarnings('ignore', '', DeprecationWarning, __name__)
|
||||||
|
|
||||||
def openfile(filename):
|
def openfile(filename):
|
||||||
path = os.path.join(os.path.dirname(landmark), 'data', filename)
|
path = os.path.join(os.path.dirname(landmark), 'data', filename)
|
||||||
return open(path, 'rb')
|
return open(path, 'r')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ from email.Iterators import _structure
|
||||||
def openfile(filename):
|
def openfile(filename):
|
||||||
from os.path import join, dirname, abspath
|
from os.path import join, dirname, abspath
|
||||||
path = abspath(join(dirname(testfile), os.pardir, 'moredata', filename))
|
path = abspath(join(dirname(testfile), os.pardir, 'moredata', filename))
|
||||||
return open(path, 'rb')
|
return open(path, 'r')
|
||||||
|
|
||||||
# Prevent this test from running in the Python distro
|
# Prevent this test from running in the Python distro
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue