Let's catch sslerror too. Why the stupid Python developers didn't make this a subclasss of socket.error, I don't know.

This commit is contained in:
Jeremy Fincher 2004-08-23 13:25:53 +00:00
parent fbb348b6e7
commit 61e471a87c

View File

@ -92,7 +92,7 @@ def getUrlFd(url, headers=None):
return fd return fd
except socket.timeout, e: except socket.timeout, e:
raise WebError, TIMED_OUT raise WebError, TIMED_OUT
except socket.error, e: except (socket.error, socket.sslerror), e:
raise WebError, strError(e) raise WebError, strError(e)
except urllib2.HTTPError, e: except urllib2.HTTPError, e:
raise WebError, strError(e) raise WebError, strError(e)