##// END OF EJS Templates
statichttprepo: explicitly convert error message to str (issue6247)...
Joerg Sonnenberger -
r46818:5135b393 default
parent child Browse files
Show More
@@ -61,7 +61,10 b' class httprangereader(object):'
61 code = f.code
61 code = f.code
62 except urlerr.httperror as inst:
62 except urlerr.httperror as inst:
63 num = inst.code == 404 and errno.ENOENT or None
63 num = inst.code == 404 and errno.ENOENT or None
64 raise IOError(num, inst)
64 # Explicitly convert the exception to str as Py3 will try
65 # convert it to local encoding and with as the HTTPResponse
66 # instance doesn't support encode.
67 raise IOError(num, str(inst))
65 except urlerr.urlerror as inst:
68 except urlerr.urlerror as inst:
66 raise IOError(None, inst.reason)
69 raise IOError(None, inst.reason)
67
70
General Comments 0
You need to be logged in to leave comments. Login now