Python 3 - Don't use unbuffered I/O in text mode.

This is unsupported in Python 3.  This could also have been fixed
by using "wb" instead of "w", but it doesn't seem like writing the
session log absolutely *needs* to be unbuffered.

llvm-svn: 252381
This commit is contained in:
Zachary Turner 2015-11-07 01:08:15 +00:00
parent 68fa1a2411
commit 8d13fab183
1 changed files with 2 additions and 2 deletions

View File

@ -1413,8 +1413,8 @@ class Base(unittest2.TestCase):
self.log_basename = self.getLogBasenameForCurrentTest()
session_file = "{}.log".format(self.log_basename)
unbuffered = 0 # 0 is the constant for unbuffered
self.session = open(session_file, "w", unbuffered)
# Python 3 doesn't support unbuffered I/O in text mode. Open buffered.
self.session = open(session_file, "w")
# Optimistically set __errored__, __failed__, __expected__ to False
# initially. If the test errored/failed, the session info