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; 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);