#4829: better error message for invalid file mode

This commit is contained in:
Georg Brandl 2010-10-21 13:45:52 +00:00
parent 9583cac633
commit 28928aef2e
1 changed files with 2 additions and 1 deletions

View File

@ -267,7 +267,8 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
if (rwa) { if (rwa) {
bad_mode: bad_mode:
PyErr_SetString(PyExc_ValueError, PyErr_SetString(PyExc_ValueError,
"Must have exactly one of read/write/append mode"); "Must have exactly one of read/write/append "
"mode and at most one plus");
goto error; goto error;
} }
rwa = 1; rwa = 1;