http_error_303 = http_error_301
# Error 307 -- relocated (temporarily)
http_error_307 = http_error_301
+ # Error 308 -- relocated (permanently)
+ http_error_308 = http_error_301
# Error 401 -- authentication required
def http_error_401(self, url, fp, errcode, errmsg, headers, data=None):
# Remove Accept-Charset
del urllib._urlopener.addheaders[-1]
- infile = open(fname, 'rb')
+ infile = open(fname, 'rt')
content = infile.read()
infile.close()