summaryrefslogtreecommitdiff
path: root/serial/rfc2217.py
diff options
context:
space:
mode:
Diffstat (limited to 'serial/rfc2217.py')
-rw-r--r--serial/rfc2217.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/serial/rfc2217.py b/serial/rfc2217.py
index fa9e07a..2012ea7 100644
--- a/serial/rfc2217.py
+++ b/serial/rfc2217.py
@@ -592,7 +592,7 @@ class RFC2217Serial(SerialBase):
self._write_lock.acquire()
try:
try:
- self._socket.sendall(data.replace(IAC, IAC_DOUBLED))
+ self._socket.sendall(to_bytes(data).replace(IAC, IAC_DOUBLED))
except socket.error, e:
raise SerialException("connection failed (socket error): %s" % e) # XXX what exception if socket connection fails
finally: