[Python-checkins] cpython (2.7): open file in binary mode

benjamin.peterson python-checkins at python.org
Mon Mar 18 05:28:46 CET 2013


http://hg.python.org/cpython/rev/6aab72424063
changeset:   82728:6aab72424063
branch:      2.7
parent:      82724:ef8ea052bcc4
user:        Benjamin Peterson <benjamin at python.org>
date:        Sun Mar 17 21:28:29 2013 -0700
summary:
  open file in binary mode

files:
  Lib/test/test_cpickle.py |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/test/test_cpickle.py b/Lib/test/test_cpickle.py
--- a/Lib/test/test_cpickle.py
+++ b/Lib/test/test_cpickle.py
@@ -23,10 +23,10 @@
 class FileIOMixin:
 
     def output(self):
-        return open(test_support.TESTFN, 'w+')
+        return open(test_support.TESTFN, 'wb+')
 
     def input(self, data):
-        f = open(test_support.TESTFN, 'w+')
+        f = open(test_support.TESTFN, 'wb+')
         try:
             f.write(data)
             f.seek(0)

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list