diff options
Diffstat (limited to 'distbuild/sockbuf.py')
-rw-r--r-- | distbuild/sockbuf.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/distbuild/sockbuf.py b/distbuild/sockbuf.py index fc0315b0..6feb8669 100644 --- a/distbuild/sockbuf.py +++ b/distbuild/sockbuf.py @@ -1,6 +1,6 @@ # mainloop/sockbuf.py -- a buffering, non-blocking socket I/O state machine # -# 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 logging @@ -144,7 +143,7 @@ class SocketBuffer(StateMachine): def _fill(self, event_source, event): try: data = event.sock.read(self._max_buffer) - except (IOError, OSError), e: + except (IOError, OSError) as e: logging.debug( '%s: _fill(): Exception %s from sock.read()', self, e) return [SocketError(event.sock, e)] @@ -164,7 +163,7 @@ class SocketBuffer(StateMachine): data = self._wbuf.read(max_write) try: n = event.sock.write(data) - except (IOError, OSError), e: + except (IOError, OSError) as e: logging.debug( '%s: _flush(): Exception %s from sock.write()', self, e) return [SocketError(event.sock, e)] |