#4829: better error message for invalid file mode
This commit is contained in:
parent
9583cac633
commit
28928aef2e
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue