I'm trying to fix the following exception I get while running Trac 0.11 with mod_fcgid on Apache2:
Unhandled exception in thread started by <bound method Connection.run of <trac.web._fcgi.Connection object at 0x88b5fec>>
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/trac/web/_fcgi.py", line 661, in run
except socket.error, e:
AttributeError: 'NoneType' object has no attribute 'error'
I modified the relevant block in _fcgi.py to lock like this:
def run(self):
"""Begin processing data from the socket."""
self._keepGoing = True
while self._keepGoing:
try:
self.process_input()
except EOFError:
break
except socket.error, e:
if e[0] == errno.EBADF:
break
raise
except select.error, e:
if e[0] == errno.EBADF: # Socket was closed by Request.
break
raise
self._cleanupSocket()
The line causing the exception is except socket.error, e:
. Reading the Pydocs I see 'socket' is a class and there should be a member named 'error', so why this exception?
I'm usually coding C or Java and never did something in Python, can someone enlighten me? :)
Thanks,
lynix