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 | |
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
-rw-r--r-- | CHANGES.txt | 1 | ||||
-rw-r--r-- | serial/urlhandler/protocol_socket.py | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index f57eab7..cda018b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -445,6 +445,7 @@ Version 2.7 2012-nn-nn Bugfixes: - [Bug 3540332] SerialException not returned +- [Bug pyserial:45] Error in socket_connection.py Bugfixes (posix): 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 |