diff options
author | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2013-10-16 02:57:27 +0000 |
---|---|---|
committer | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2013-10-16 02:57:27 +0000 |
commit | f911f1be9b07d0489f4e51c8d39e277c552ed9ae (patch) | |
tree | 8fe7d9de8d4bb052d04d75db64c05aa59cf9f2a3 /serial/rfc2217.py | |
parent | 6a5185b55c57f56abe67cead08925ac78fb1830b (diff) | |
download | pyserial-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/rfc2217.py')
-rw-r--r-- | serial/rfc2217.py | 2 |
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: |