diff options
author | Benjamin Peterson <benjamin@python.org> | 2011-01-12 18:56:07 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2011-01-12 18:56:07 (GMT) |
commit | 23b628ed0bb52738540456a9972f7c68cb1433dc (patch) | |
tree | d8c46be6ef8b5e1b0a9e42d2b073e0389abc3707 /Objects | |
parent | 318b8f35fe6c56c2c2792192ccdeb2b47eff81e4 (diff) | |
download | cpython-23b628ed0bb52738540456a9972f7c68cb1433dc.zip cpython-23b628ed0bb52738540456a9972f7c68cb1433dc.tar.gz cpython-23b628ed0bb52738540456a9972f7c68cb1433dc.tar.bz2 |
use PyErr_SetString instead of PyErr_Format
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/typeobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 930297a..87c8723 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; } } |