Added another case to except clauses for Connection Reset by Peer.

This commit is contained in:
Jeremy Fincher 2003-12-06 14:16:02 +00:00
parent d06418633c
commit 1dfca188e9

View File

@ -49,6 +49,8 @@ def getUrlFd(url):
raise WebError, 'Connection refused.' raise WebError, 'Connection refused.'
elif e.args[0] in (110, 10060): elif e.args[0] in (110, 10060):
raise WebError, 'Connection timed out.' raise WebError, 'Connection timed out.'
elif e.args[0] == 104:
raise WebError, 'Connection reset by peer.'
else: else:
raise WebError, str(e) raise WebError, str(e)
except (urllib2.HTTPError, urllib2.URLError), e: except (urllib2.HTTPError, urllib2.URLError), e: