Rewrap error message.
This commit is contained in:
parent
8b2b8dbefa
commit
1c280ab7d6
|
@ -794,9 +794,10 @@ Reader_iternext(ReaderObj *self)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (!PyUnicode_Check(lineobj)) {
|
if (!PyUnicode_Check(lineobj)) {
|
||||||
PyErr_Format(error_obj, "iterator should return "
|
PyErr_Format(error_obj,
|
||||||
"strings, not %.200s (did you open "
|
"iterator should return strings, "
|
||||||
"the file in text mode?)",
|
"not %.200s "
|
||||||
|
"(did you open the file in text mode?)",
|
||||||
lineobj->ob_type->tp_name
|
lineobj->ob_type->tp_name
|
||||||
);
|
);
|
||||||
Py_DECREF(lineobj);
|
Py_DECREF(lineobj);
|
||||||
|
|
Loading…
Reference in New Issue