From: Georg Brandl Date: Tue, 4 Aug 2009 20:29:27 +0000 (+0000) Subject: Slightly improve buffer-related error message. X-Git-Tag: v3.2a1~2705 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=61b96dc2fe814595651b6e1af394b34cb41fb485;p=thirdparty%2FPython%2Fcpython.git Slightly improve buffer-related error message. --- diff --git a/Objects/abstract.c b/Objects/abstract.c index 3b2de9d6c1fe..524782477066 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -331,7 +331,7 @@ PyObject_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { if (!PyObject_CheckBuffer(obj)) { PyErr_Format(PyExc_TypeError, - "'%100s' does not have the buffer interface", + "'%100s' does not support the buffer interface", Py_TYPE(obj)->tp_name); return -1; } diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c index 2990c256384c..7acd569d73bf 100644 --- a/Objects/memoryobject.c +++ b/Objects/memoryobject.c @@ -255,7 +255,7 @@ PyMemoryView_GetContiguous(PyObject *obj, int buffertype, char fort) if (!PyObject_CheckBuffer(obj)) { PyErr_SetString(PyExc_TypeError, - "object does not have the buffer interface"); + "object does not support the buffer interface"); return NULL; }