1
You can see how this exception is raised in the httplib2
source and the custom RedirectLimit
exception. So to catch it:
from httplib2 import RedirectLimit
try:
...
except (RedirectLimit, httplib2.ServerNotFoundError, UnicodeError, httplib2.RelativeURIError):
return 'bad'
Source:stackexchange.com