Private GIT

Skip to content
Snippets Groups Projects
Commit 221f30f8 authored by Matthew Schick's avatar Matthew Schick
Browse files

Attempting a fix for #248 (patch from upstream #62)

parent 56e48c46
No related branches found
No related tags found
No related merge requests found
...@@ -41,6 +41,7 @@ import copy ...@@ -41,6 +41,7 @@ import copy
import calendar import calendar
import time import time
import random import random
import errno
# remove depracated warning in python2.6 # remove depracated warning in python2.6
try: try:
from hashlib import sha1 as _sha, md5 as _md5 from hashlib import sha1 as _sha, md5 as _md5
...@@ -863,7 +864,13 @@ the same interface as FileCache.""" ...@@ -863,7 +864,13 @@ the same interface as FileCache."""
except socket.gaierror: except socket.gaierror:
conn.close() conn.close()
raise ServerNotFoundError("Unable to find the server at %s" % conn.host) raise ServerNotFoundError("Unable to find the server at %s" % conn.host)
except (socket.error, httplib.HTTPException): except socket.error, e:
if e.errno == errno.ECONNREFUSED: # Connection refused
raise
# Just because the server closed the connection doesn't apparently mean
# that the server didn't send a response.
pass
except httplib.HTTPException:
# Just because the server closed the connection doesn't apparently mean # Just because the server closed the connection doesn't apparently mean
# that the server didn't send a response. # that the server didn't send a response.
pass pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment