diff options
Diffstat (limited to 'distbuild/connection_machine.py')
-rw-r--r-- | distbuild/connection_machine.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/distbuild/connection_machine.py b/distbuild/connection_machine.py index e75ebe56..b8248931 100644 --- a/distbuild/connection_machine.py +++ b/distbuild/connection_machine.py @@ -1,6 +1,6 @@ # distbuild/connection_machine.py -- state machine for connecting to server # -# Copyright (C) 2012, 2014 Codethink Limited +# Copyright (C) 2012, 2014-2015 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.. +# with this program. If not, see <http://www.gnu.org/licenses/>. import errno @@ -106,7 +105,7 @@ class ConnectionMachine(distbuild.StateMachine): distbuild.set_nonblocking(self._socket) try: self._socket.connect((self._addr, self._port)) - except socket.error, e: + except socket.error as e: if e.errno != errno.EINPROGRESS: raise socket.error( "%s (attempting connection to distbuild controller " @@ -118,7 +117,7 @@ class ConnectionMachine(distbuild.StateMachine): def _connect(self, event_source, event): try: self._socket.connect((self._addr, self._port)) - except socket.error, e: + except socket.error as e: logging.error( 'Failed to connect to %s:%s: %s' % (self._addr, self._port, str(e))) |