python
import httplib2
python
http = httplib2.Http()
try:
response, content = http.request(url, method='GET')
except httplib2.HttpLib2Error as e:
except httplib2.RelativeURIError as e:
except httplib2.ServerNotFoundError as e:
except httplib2.RedirectLimit as e:
python
import time
http = httplib2.Http()
for i in range(retry_count):
try:
response, content = http.request(url, method='GET')
except (httplib2.HttpLib2Error, httplib2.RelativeURIError, httplib2.ServerNotFoundError, httplib2.RedirectLimit) as e:
if i == retry_count - 1:
raise
else:
time.sleep(retry_delay)