Rewrap error message.

This commit is contained in:
Georg Brandl 2007-11-27 20:40:22 +00:00
parent 8b2b8dbefa
commit 1c280ab7d6
1 changed files with 4 additions and 3 deletions

View File

@ -794,9 +794,10 @@ Reader_iternext(ReaderObj *self)
return NULL;
}
if (!PyUnicode_Check(lineobj)) {
PyErr_Format(error_obj, "iterator should return "
"strings, not %.200s (did you open "
"the file in text mode?)",
PyErr_Format(error_obj,
"iterator should return strings, "
"not %.200s "
"(did you open the file in text mode?)",
lineobj->ob_type->tp_name
);
Py_DECREF(lineobj);