Commit 38e6a69a authored by Walter Dörwald's avatar Walter Dörwald

Make pickle errror message unicode objects.

parent bc1f8861
......@@ -393,13 +393,13 @@ cPickle_ErrFormat(PyObject *ErrType, char *stringformat, char *format, ...)
if (format) args = Py_VaBuildValue(format, va);
va_end(va);
if (format && ! args) return NULL;
if (stringformat && !(retval=PyString_FromString(stringformat)))
if (stringformat && !(retval=PyUnicode_FromString(stringformat)))
return NULL;
if (retval) {
if (args) {
PyObject *v;
v=PyString_Format(retval, args);
v=PyUnicode_Format(retval, args);
Py_DECREF(retval);
Py_DECREF(args);
if (! v) return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment