class MyURLopener(urllib.URLopener):
- # Error 301 -- relocated (temporarily)
+ # Error 301 -- relocated (permanently)
def http_error_301(self, url, fp, errcode, errmsg, headers, data=None):
if headers.has_key('location'):
newurl = headers['location']
newurl = "Nowhere"
raise RedirectException(errcode, newurl)
- # Error 302 -- also relocated (permanently)
+ # Error 302 -- relocated (temporarily)
http_error_302 = http_error_301
- # Error 303 -- also relocated (permanently)
+ # Error 303 -- relocated (see other)
http_error_303 = http_error_301
- # Error 307 -- also relocated (temporary)
+ # Error 307 -- relocated (temporarily)
http_error_307 = http_error_301
# Error 401 -- authentication required