diff options
author | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2013-05-31 00:55:43 +0000 |
---|---|---|
committer | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2013-05-31 00:55:43 +0000 |
commit | a13d84a44b1183b6ecdd2839651735c837e2894e (patch) | |
tree | effdf4604d62883a23ab3522aefc0d0400aad5c2 /serial | |
parent | 3067da1bb2dc414d6a07bc6d4751ac460c9672ee (diff) | |
download | pyserial-a13d84a44b1183b6ecdd2839651735c837e2894e.tar.gz |
[Bug pyserial:45] Error in socket_connection.py
git-svn-id: http://svn.code.sf.net/p/pyserial/code/trunk/pyserial@457 f19166aa-fa4f-0410-85c2-fa1106f25c8a
Diffstat (limited to 'serial')
-rw-r--r-- | serial/urlhandler/protocol_socket.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/serial/urlhandler/protocol_socket.py b/serial/urlhandler/protocol_socket.py index ec2e0ab..ccf7e14 100644 --- a/serial/urlhandler/protocol_socket.py +++ b/serial/urlhandler/protocol_socket.py @@ -140,7 +140,9 @@ class SocketSerial(SerialBase): try: # an implementation with internal buffer would be better # performing... - data = self._socket.recv(size - len(data)) + block = self._socket.recv(size - len(data)) + if block: + data.append(block) except socket.timeout: # just need to get out of recv form time to time to check if # still alive |