diff options
author | Georg Brandl <georg@python.org> | 2010-10-21 13:45:52 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-10-21 13:45:52 (GMT) |
commit | 28928aef2ed23ae038ba2dd12b7adc51fa62805f (patch) | |
tree | 9baf5d9357167d4a70a0db8896f649e72c26776c /Modules | |
parent | 9583cac6337f9a5f2670fbe5e1f2e85aaad04522 (diff) | |
download | cpython-28928aef2ed23ae038ba2dd12b7adc51fa62805f.zip cpython-28928aef2ed23ae038ba2dd12b7adc51fa62805f.tar.gz cpython-28928aef2ed23ae038ba2dd12b7adc51fa62805f.tar.bz2 |
#4829: better error message for invalid file mode
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_io/fileio.c | 3 |
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; |