Harlin Seritt <[EMAIL PROTECTED]> wrote: > except socket.error: > code goes here... > > Of course, though, these are two separate error messages under the same > error handler though. I've tried: > > except socket.error, (10061, 'Connection refused'): > and > except (socket.error, 10061, 'Connection refused'): > > to no avail. What do I need to do to catch each one specifically?
what I've done in such situations is except socket.error, e: if e.errno == 10061: ... elif e.errno == 10060: ... else: raise Not sure the code in a socket.error has attributename 'errno', but I hope you get the general idea. Alex -- http://mail.python.org/mailman/listinfo/python-list