[Twisted-Python] socket errors

Creating a socket can raise an exception in a few circumstances. Bad arguments for one (we don't have to worry about this, since we control the arguments in all circumstances); too many open files for another. Attached patch addresses the second circumstance, by catching the raised socket.error and wrapping it up in a CannotListenError. It seems unlikely that anyone has code to handle this error condition (and hence is relying on socket.error being raised), and CannotListenError seems to be a better thing to be raising in this case. Anyone disagree? Also, the XYZClient classes might be changed to catch the same socket.error and raise a ConnectError instead (attached doesn't address this). Jp -- Elitism: It's lonely at the top, but it's comforting to look down upon everyone at the bottom. -- 12:00am up 35 days, 9:48, 3 users, load average: 0.61, 0.33, 0.22
participants (2)
-
Itamar Shtull-Trauring
-
Jp Calderone