Skip to content

Commit

Permalink
[test] Make sys.stdout compatible with both Python 2 & 3
Browse files Browse the repository at this point in the history
This time's the charm.

llvm-svn: 370552
  • Loading branch information
JDevlieghere committed Aug 30, 2019
1 parent d21a3e4 commit 1ea9092
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lldb/packages/Python/lldbsuite/test/lldbpexpect.py
Expand Up @@ -28,7 +28,8 @@ def expect_prompt(self):
self.child.expect_exact(self.PROMPT)

def launch(self, executable=None, timeout=30, dimensions=None):
logfile = sys.stdout.buffer if self.TraceOn() else None
logfile = getattr(sys.stdout, 'buffer',
sys.stdout) if self.TraceOn() else None
args = ['--no-lldbinit', '--no-use-colors']
for cmd in self.setUpCommands():
args += ['-O', cmd]
Expand Down

0 comments on commit 1ea9092

Please sign in to comment.