From: Benjamin Peterson Date: Wed, 12 Jan 2011 18:56:07 +0000 (+0000) Subject: use PyErr_SetString instead of PyErr_Format X-Git-Tag: v3.2rc1~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=23b628ed0bb52738540456a9972f7c68cb1433dc;p=thirdparty%2FPython%2Fcpython.git use PyErr_SetString instead of PyErr_Format --- diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 930297a7bb6d..87c8723ee9cb 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -326,7 +326,7 @@ type_abstractmethods(PyTypeObject *type, void *context) if (type != &PyType_Type) mod = PyDict_GetItemString(type->tp_dict, "__abstractmethods__"); if (!mod) { - PyErr_Format(PyExc_AttributeError, "__abstractmethods__"); + PyErr_SetString(PyExc_AttributeError, "__abstractmethods__"); return NULL; } Py_XINCREF(mod); @@ -347,7 +347,7 @@ type_set_abstractmethods(PyTypeObject *type, PyObject *value, void *context) else { res = PyDict_DelItemString(type->tp_dict, "__abstractmethods__"); if (res && PyErr_ExceptionMatches(PyExc_KeyError)) { - PyErr_Format(PyExc_AttributeError, "__abstractmethods__", value); + PyErr_SetString(PyExc_AttributeError, "__abstractmethods__"); return -1; } }