soc/tools/litex_term.py: fix reader for c = b"\r" case
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 11 Jan 2017 00:56:10 +0000 (01:56 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 11 Jan 2017 00:56:31 +0000 (01:56 +0100)
litex/soc/tools/litex_term.py

index 53da5368beeacf1cfac7867045fb64fc1e2d9e40..43ebbd7be34ca4767076c6ac117ec763f7e56ca5 100644 (file)
@@ -214,7 +214,7 @@ class LiteXTerm:
             while self.reader_alive:
                 c = self.port.read()
                 if c == b"\r":
-                    sys.stdout.write(b"\n")
+                    sys.stdout.buffer.write(b"\n")
                 else:
                        sys.stdout.buffer.write(c)
                 sys.stdout.flush()