mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Fix SF #749831, copy raises SystemError when getstate raises exception
This commit is contained in:
parent
f0b1a1fca9
commit
e2fdc61004
2 changed files with 8 additions and 0 deletions
|
|
@ -2536,6 +2536,8 @@ reduce_2(PyObject *obj)
|
|||
if (getstate != NULL) {
|
||||
state = PyObject_CallObject(getstate, NULL);
|
||||
Py_DECREF(getstate);
|
||||
if (state == NULL)
|
||||
goto end;
|
||||
}
|
||||
else {
|
||||
state = PyObject_GetAttrString(obj, "__dict__");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue