summaryrefslogtreecommitdiff
path: root/serial/urlhandler/protocol_socket.py
diff options
context:
space:
mode:
authorcliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2013-10-16 02:57:27 +0000
committercliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a>2013-10-16 02:57:27 +0000
commitf911f1be9b07d0489f4e51c8d39e277c552ed9ae (patch)
tree8fe7d9de8d4bb052d04d75db64c05aa59cf9f2a3 /serial/urlhandler/protocol_socket.py
parent6a5185b55c57f56abe67cead08925ac78fb1830b (diff)
downloadpyserial-f911f1be9b07d0489f4e51c8d39e277c552ed9ae.tar.gz
Ensure working with bytes in write() calls. to_bytes() extended to handle bytes and memoryview instaces
git-svn-id: http://svn.code.sf.net/p/pyserial/code/trunk/pyserial@479 f19166aa-fa4f-0410-85c2-fa1106f25c8a
Diffstat (limited to 'serial/urlhandler/protocol_socket.py')
-rw-r--r--serial/urlhandler/protocol_socket.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/serial/urlhandler/protocol_socket.py b/serial/urlhandler/protocol_socket.py
index 58eddd1..c90a8e4 100644
--- a/serial/urlhandler/protocol_socket.py
+++ b/serial/urlhandler/protocol_socket.py
@@ -168,7 +168,7 @@ class SocketSerial(SerialBase):
closed."""
if not self._isOpen: raise portNotOpenError
try:
- self._socket.sendall(data)
+ self._socket.sendall(to_bytes(data))
except socket.error, e:
# XXX what exception if socket connection fails
raise SerialException("socket connection failed: %s" % e)