forked from platformio/platformio-core
Skip async output when empty byte is given
This commit is contained in:
@ -33,8 +33,11 @@ class GDBBytesIO(BytesIO): # pylint: disable=too-few-public-methods
|
|||||||
STDOUT = sys.stdout
|
STDOUT = sys.stdout
|
||||||
|
|
||||||
def write(self, text):
|
def write(self, text):
|
||||||
for line in text.strip().split("\n"):
|
if "\n" in text:
|
||||||
self.STDOUT.write('~"%s\\n"\n' % line)
|
for line in text.strip().split("\n"):
|
||||||
|
self.STDOUT.write('~"%s\\n"\n' % line)
|
||||||
|
else:
|
||||||
|
self.STDOUT.write('~"%s"' % text)
|
||||||
self.STDOUT.flush()
|
self.STDOUT.flush()
|
||||||
|
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ class BuildAsyncPipe(AsyncPipeBase):
|
|||||||
for byte in iter(lambda: self._pipe_reader.read(1), ""):
|
for byte in iter(lambda: self._pipe_reader.read(1), ""):
|
||||||
self._buffer += byte
|
self._buffer += byte
|
||||||
|
|
||||||
if line and line[-3:] == (line[-1] * 3):
|
if line and byte.strip() and line[-3:] == (byte * 3):
|
||||||
print_immediately = True
|
print_immediately = True
|
||||||
|
|
||||||
if print_immediately:
|
if print_immediately:
|
||||||
|
Reference in New Issue
Block a user