mirror of https://github.com/ArduPilot/ardupilot
autotest: use StringIO correctly
This commit is contained in:
parent
5c554221c7
commit
0b9d9fc284
|
@ -5386,7 +5386,7 @@ Also, ignores heartbeats not from our target system'''
|
|||
class Capturing(list):
|
||||
def __enter__(self):
|
||||
self._stderr = sys.stderr
|
||||
sys.stderr = self._stringio = StringIO()
|
||||
sys.stderr = self._stringio = StringIO.StringIO()
|
||||
return self
|
||||
def __exit__(self, *args):
|
||||
self.extend(self._stringio.getvalue().splitlines())
|
||||
|
|
Loading…
Reference in New Issue