diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-04-09 14:02:04 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-04-10 15:13:29 +0300 |
commit | b772a26680895ecf102b524444623fc10c4d183d (patch) | |
tree | 7c857d2dfddba58118e2e399d896205e740edc6e /distbuild/connection_machine.py | |
parent | fb92c950ebd8fd8129fc40203be2b9210c15d3db (diff) | |
download | morph-b772a26680895ecf102b524444623fc10c4d183d.tar.gz |
distbuild: Improve logging of connections and objects
New DistbuildSocket class that wraps socket.socket(), providing a
descriptive repr() handler showing where the socket is connected, and
providing a couple of helper methods for fetching local and remote
endpoint names.
This commit also adds a descriptive repr() handler to a few other
objects (mostly giving socket connection details).
Diffstat (limited to 'distbuild/connection_machine.py')
-rw-r--r-- | distbuild/connection_machine.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/distbuild/connection_machine.py b/distbuild/connection_machine.py index 3d4e8d04..2f768f0b 100644 --- a/distbuild/connection_machine.py +++ b/distbuild/connection_machine.py @@ -97,7 +97,7 @@ class ConnectionMachine(distbuild.StateMachine): logging.debug( 'ConnectionMachine: connecting to %s:%s' % (self._addr, self._port)) - self._socket = socket.socket() + self._socket = distbuild.create_socket() distbuild.set_nonblocking(self._socket) try: self._socket.connect((self._addr, self._port)) |