forked from OSchip/llvm-project
[test] Make sys.stdout compatible with both Python 2 & 3
This time's the charm. llvm-svn: 370552
This commit is contained in:
parent
d21a3e41a4
commit
1ea909270c
|
@ -28,7 +28,8 @@ else:
|
||||||
self.child.expect_exact(self.PROMPT)
|
self.child.expect_exact(self.PROMPT)
|
||||||
|
|
||||||
def launch(self, executable=None, timeout=30, dimensions=None):
|
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']
|
args = ['--no-lldbinit', '--no-use-colors']
|
||||||
for cmd in self.setUpCommands():
|
for cmd in self.setUpCommands():
|
||||||
args += ['-O', cmd]
|
args += ['-O', cmd]
|
||||||
|
|
Loading…
Reference in New Issue