]> granicus.if.org Git - python/commitdiff
Correct error message in io.open():
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>
Wed, 29 Oct 2008 23:15:57 +0000 (23:15 +0000)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>
Wed, 29 Oct 2008 23:15:57 +0000 (23:15 +0000)
closefd=True is the only accepted value with a file name.

Modules/_fileio.c

index d7f78936715c9d5c7e3da06426024948a8fdfab3..b33b745ab1bbe6108ef778e2b6a5eef86ef3f895 100644 (file)
@@ -249,7 +249,7 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
                self->closefd = 1;
                if (!closefd) {
                        PyErr_SetString(PyExc_ValueError,
-                            "Cannot use closefd=True with file name");
+                            "Cannot use closefd=False with file name");
                        goto error;
                }