Skip to content

Commit 0cc085b

Browse files
author
Ralf Schlatterbeck
committed
Band-aid over handling of netework errors.
On a busy tracker (on Linux 2.6.8) we will get "error instance has no attribute 'errno'" several times a day (less often I'm getting "timeout instance has no attribute 'errno'"). This fixes the immediate error. However this seems to have masked a "Connection reset by peer" error that is not yet fixed with this patch. See also [SF#1600727] sf.net/tracker/index.php?func=detail&aid=1600727&group_id=31577&atid=402788
1 parent 19a27e7 commit 0cc085b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

roundup/cgi/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.231 2006-12-29 08:00:21 richard Exp $
1+
# $Id: client.py,v 1.232 2007-01-15 21:10:26 schlatterbeck Exp $
22

33
"""WWW request handler (also used in the stand-alone server).
44
"""
@@ -847,7 +847,8 @@ def _socket_op(self, call, *args, **kwargs):
847847
try:
848848
call(*args, **kwargs)
849849
except socket.error, err:
850-
if err.errno not in self.IGNORE_NET_ERRORS:
850+
err_errno = getattr (err, 'errno', None)
851+
if err_errno not in self.IGNORE_NET_ERRORS:
851852
raise
852853

853854
def write(self, content):

0 commit comments

Comments
 (0)