diff roundup/cgi/client.py @ 3807:c27aafab067d

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
author Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
date Mon, 15 Jan 2007 21:10:26 +0000
parents 75d3896929bb
children 36eb9e8faf30
line wrap: on
line diff
--- a/roundup/cgi/client.py	Sun Jan 14 22:54:15 2007 +0000
+++ b/roundup/cgi/client.py	Mon Jan 15 21:10:26 2007 +0000
@@ -1,4 +1,4 @@
-# $Id: client.py,v 1.231 2006-12-29 08:00:21 richard Exp $
+# $Id: client.py,v 1.232 2007-01-15 21:10:26 schlatterbeck Exp $
 
 """WWW request handler (also used in the stand-alone server).
 """
@@ -847,7 +847,8 @@
         try:
             call(*args, **kwargs)
         except socket.error, err:
-            if err.errno not in self.IGNORE_NET_ERRORS:
+            err_errno = getattr (err, 'errno', None)
+            if err_errno not in self.IGNORE_NET_ERRORS:
                 raise
 
     def write(self, content):

Roundup Issue Tracker: http://roundup-tracker.org/