Commit 60fc3f82 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Improve error log message.


git-svn-id: https://svn.erp5.org/repos/neo/trunk@1288 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 5be77f53
...@@ -70,8 +70,8 @@ class SocketConnector: ...@@ -70,8 +70,8 @@ class SocketConnector:
raise ConnectorInProgressException raise ConnectorInProgressException
if err == errno.ECONNREFUSED: if err == errno.ECONNREFUSED:
raise ConnectorConnectionRefusedException raise ConnectorConnectionRefusedException
raise ConnectorException, 'makeClientConnection failed: ' \ raise ConnectorException, 'makeClientConnection to %s failed: ' \
'%s:%s' % (err, errmsg) '%s:%s' % (addr, err, errmsg)
finally: finally:
logging.debug('%r connecting to %r', self.socket.getsockname(), logging.debug('%r connecting to %r', self.socket.getsockname(),
addr) addr)
...@@ -85,8 +85,8 @@ class SocketConnector: ...@@ -85,8 +85,8 @@ class SocketConnector:
self.socket.listen(5) self.socket.listen(5)
except socket.error, (err, errmsg): except socket.error, (err, errmsg):
self.socket.close() self.socket.close()
raise ConnectorException, 'makeListeningConnection failed: %s:%s' % \ raise ConnectorException, 'makeListeningConnection on %s failed: %s:%s' % \
(err, errmsg) (addr, err, errmsg)
def getError(self): def getError(self):
return self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) return self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment