diff options
author | Zachary Turner <zturner@google.com> | 2015-11-07 01:08:15 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2015-11-07 01:08:15 +0000 |
commit | 8d13fab183bc6ce0793a1c039448a738709f00ae (patch) | |
tree | ffeac55c25dd20aa3e61c16364b94ea893d971cd /lldb/packages/Python/lldbsuite | |
parent | 68fa1a2411e8519c2d3d40e2f02291a5ca95a092 (diff) | |
download | bcm5719-llvm-8d13fab183bc6ce0793a1c039448a738709f00ae.tar.gz bcm5719-llvm-8d13fab183bc6ce0793a1c039448a738709f00ae.zip |
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
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lldbtest.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index 9d0c4e2559f..e52c5bf5eb7 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -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 |