summaryrefslogtreecommitdiffstats
path: root/Modules/_io
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-10-21 13:45:52 (GMT)
committerGeorg Brandl <georg@python.org>2010-10-21 13:45:52 (GMT)
commit28928aef2ed23ae038ba2dd12b7adc51fa62805f (patch)
tree9baf5d9357167d4a70a0db8896f649e72c26776c /Modules/_io
parent9583cac6337f9a5f2670fbe5e1f2e85aaad04522 (diff)
downloadcpython-28928aef2ed23ae038ba2dd12b7adc51fa62805f.zip
cpython-28928aef2ed23ae038ba2dd12b7adc51fa62805f.tar.gz
cpython-28928aef2ed23ae038ba2dd12b7adc51fa62805f.tar.bz2
#4829: better error message for invalid file mode
Diffstat (limited to 'Modules/_io')
-rw-r--r--Modules/_io/fileio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c
index ff278cf..74009e3 100644
--- a/Modules/_io/fileio.c
+++ b/Modules/_io/fileio.c
@@ -267,7 +267,8 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
if (rwa) {
bad_mode:
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;
}
rwa = 1;