req = urllib.request.Request(url)
try:
    response = urllib.request.urlopen(url)
except urllib.error.HTTPError as e:
    raise HoustonWeHaveAProblem
else:
    if response.url != url:
        pass
how to check if the urllib2 follow a redirect?