diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-07-20 11:52:54 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-07-20 11:52:54 (GMT) |
commit | a0364764fdaca63881dc78d8625e05d9880fc440 (patch) | |
tree | d13c4ea3329997b38354904cf90d09dc007dfa01 /Objects/classobject.c | |
parent | 5e1658c5d7030d03148a4805ffb09d4374963580 (diff) | |
parent | ddcb6206bf7feebb0a1671e475ee877f683af145 (diff) | |
download | cpython-a0364764fdaca63881dc78d8625e05d9880fc440.zip cpython-a0364764fdaca63881dc78d8625e05d9880fc440.tar.gz cpython-a0364764fdaca63881dc78d8625e05d9880fc440.tar.bz2 |
Merge 3.2
Diffstat (limited to 'Objects/classobject.c')
-rw-r--r-- | Objects/classobject.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c index 0416a6a..c481dd3 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -244,8 +244,10 @@ method_repr(PyMethodObject *a) else { klassname = _PyObject_GetAttrId(klass, &PyId___name__); if (klassname == NULL) { - if (!PyErr_ExceptionMatches(PyExc_AttributeError)) + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { + Py_XDECREF(funcname); return NULL; + } PyErr_Clear(); } else if (!PyUnicode_Check(klassname)) { |