]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
openfile(): Go back to opening the files in text mode. This undoes
authorBarry Warsaw <barry@python.org>
Mon, 7 Oct 2002 17:05:28 +0000 (17:05 +0000)
committerBarry Warsaw <barry@python.org>
Mon, 7 Oct 2002 17:05:28 +0000 (17:05 +0000)
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 and the Parser.py patch will be forward ported into Python 2.3
and email 2.5.

Lib/email/test/test_email.py
Lib/email/test/test_email_torture.py

index 926c6bf5867d0613517b65d50d68a89be0fc347e..5bbb79416b597f917245ae908cbd50caa7c09e21 100644 (file)
@@ -46,7 +46,7 @@ warnings.filterwarnings('ignore', '', DeprecationWarning, __name__)
 \f
 def openfile(filename):
     path = os.path.join(os.path.dirname(landmark), 'data', filename)
-    return open(path, 'rb')
+    return open(path, 'r')
 
 
 \f
index 76d66a9ba71ec61bc82586294be65fa9ef326ecc..8d58b463b4cf87e409d4a3abfe2b27efc771fa9f 100644 (file)
@@ -22,7 +22,7 @@ from email.Iterators import _structure
 def openfile(filename):
     from os.path import join, dirname, abspath
     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
 try: