diff options
Diffstat (limited to 'serial/urlhandler/protocol_spy.py')
-rw-r--r-- | serial/urlhandler/protocol_spy.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/serial/urlhandler/protocol_spy.py b/serial/urlhandler/protocol_spy.py index 92aaa2e..67c700b 100644 --- a/serial/urlhandler/protocol_spy.py +++ b/serial/urlhandler/protocol_spy.py @@ -26,6 +26,7 @@ import sys import time import serial +from serial.serialutil import to_bytes try: import urlparse @@ -200,6 +201,7 @@ class Serial(serial.Serial): return ''.join([parts.netloc, parts.path]) def write(self, tx): + tx = to_bytes(tx) self.formatter.tx(tx) return super(Serial, self).write(tx) |