[Python-checkins] r87960 - python/branches/py3k/Objects/typeobject.c
benjamin.peterson
python-checkins at python.org
Wed Jan 12 19:56:07 CET 2011
Author: benjamin.peterson
Date: Wed Jan 12 19:56:07 2011
New Revision: 87960
Log:
use PyErr_SetString instead of PyErr_Format
Modified:
python/branches/py3k/Objects/typeobject.c
Modified: python/branches/py3k/Objects/typeobject.c
==============================================================================
--- python/branches/py3k/Objects/typeobject.c (original)
+++ python/branches/py3k/Objects/typeobject.c Wed Jan 12 19:56:07 2011
@@ -326,7 +326,7 @@
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 @@
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;
}
}
More information about the Python-checkins
mailing list