diff options
author | Javier Jardón <jjardon@gnome.org> | 2015-03-13 13:02:24 +0000 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2015-03-16 16:34:55 +0000 |
commit | aab6f2b5d3621d5760145d133a72495ef2ac1f25 (patch) | |
tree | 561f7ca9b2ce8fd78fbf425d7b7fc3b7e12adcd5 /distbuild/connection_machine.py | |
parent | db23e8e6406f98722d2d18bf61b8e85cd99415eb (diff) | |
download | morph-aab6f2b5d3621d5760145d133a72495ef2ac1f25.tar.gz |
Use python3 compatible notation for catching exceptions
Change-Id: Ibda7a938cd16e35517a531140f39ef4664d85c72
Diffstat (limited to 'distbuild/connection_machine.py')
-rw-r--r-- | distbuild/connection_machine.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/distbuild/connection_machine.py b/distbuild/connection_machine.py index b17a0e1d..b8248931 100644 --- a/distbuild/connection_machine.py +++ b/distbuild/connection_machine.py @@ -105,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 " @@ -117,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))) |