From: Georg Brandl Date: Thu, 21 Oct 2010 13:45:52 +0000 (+0000) Subject: #4829: better error message for invalid file mode X-Git-Tag: v3.2a4~396 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=28928aef2ed23ae038ba2dd12b7adc51fa62805f;p=thirdparty%2FPython%2Fcpython.git #4829: better error message for invalid file mode --- diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c index ff278cfb1af1..74009e3657dd 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;