]> granicus.if.org Git - python/commitdiff
#4829: better error message for invalid file mode
authorGeorg Brandl <georg@python.org>
Thu, 21 Oct 2010 13:45:52 +0000 (13:45 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 21 Oct 2010 13:45:52 +0000 (13:45 +0000)
Modules/_io/fileio.c

index ff278cfb1af103f9ce988bb0ad3fd6dec3a42437..74009e3657dd0aeab9b91fdef78ae87359d99271 100644 (file)
@@ -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;