[PATCH] Re: Throw errors on connection refused and on non-standard SSL ports
Sebastian at SSpaeth.de
Fri Jun 17 07:44:32 BST 2011
On Thu, 16 Jun 2011 23:51:27 +0200, Nicolas Sebrecht wrote:
> On Mon, Jun 06, 2011 at 11:04:55AM +0200, Sebastian Spaeth wrote:
> > We were "crashing" with tracebacks when we could not connect to a host,
> > (e.g. because no service was on the port) and we were getting mysterious
> > SSL tracebacks when someone tried to connect via SSL to a non-ssl port.
> > In these cases, we will now throw an nice error message. On python<2.6
> > where no ssl module exists, we simply won't throw those errors.
> elif isinstance(e, SSLError) and e.errno == 1:
> TypeError: isinstance() arg 2 must be a class, type, or tuple of classes and types
> I'm afraid I don't have time to look more deeply, for now.
Yeah, on python2.5 I made SSLError simply be None, but that doesn't work
for isinstance() checks. I can make this work properly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the OfflineIMAP-project