Private GIT

Skip to content
Snippets Groups Projects
Commit c137bea1 authored by Nic Wolfe's avatar Nic Wolfe
Browse files

Fix httplib2 from throwing errors for no reason

parent f406589f
No related branches found
No related tags found
No related merge requests found
...@@ -869,7 +869,9 @@ the same interface as FileCache.""" ...@@ -869,7 +869,9 @@ the same interface as FileCache."""
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, e: except socket.error, e:
if e.errno == errno.ECONNREFUSED: # Connection refused if not hasattr(e, 'errno'): # I don't know what this is so lets raise it if it happens
raise
elif e.errno == errno.ECONNREFUSED: # Connection refused
raise raise
# 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.
......
...@@ -28,6 +28,7 @@ import warnings ...@@ -28,6 +28,7 @@ import warnings
import logging import logging
import datetime import datetime
import time import time
import traceback
try: try:
import xml.etree.cElementTree as ElementTree import xml.etree.cElementTree as ElementTree
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment