Browse Source

[2617] make sure error info isn't lost on socket.error in getbytes()

the previous code (probably unintentionally) converted it to an empty
socket.error, resulting in useless debug message.
JINMEI Tatuya 12 years ago
parent
commit
fe0db0adf0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/bin/msgq/msgq.py.in

+ 2 - 2
src/bin/msgq/msgq.py.in

@@ -347,8 +347,8 @@ class MsgQ:
         while len(received) < length:
             try:
                 data = sock.recv(length - len(received))
-            except socket.error:
-                raise MsgQReceiveError(socket.error)
+            except socket.error as err:
+                raise MsgQReceiveError(str(err))
             if len(data) == 0:
                 raise MsgQReceiveError("EOF")
             received += data