8000 Objects/odictobject.c · python/cpython@fde54d4 · GitHub
[go: up one dir, main page]

Skip to content

Commit fde54d4

Browse files
committed
Objects/odictobject.c
1 parent 13cb48c commit fde54d4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Objects/odictobject.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,10 +1556,9 @@ _PyODict_SetItem_KnownHash(PyObject *od, PyObject *key, PyObject *value,
15561556
res = _odict_add_new_node((PyODictObject *)od, key, hash);
15571557
if (res < 0) {
15581558
/* Revert setting the value on the dict */
1559-
PyObject *exc, *val, *tb;
1560-
PyErr_Fetch(&exc, &val, &tb);
1559+
PyObject *exc = PyErr_GetRaisedException();
15611560
(void) _PyDict_DelItem_KnownHash(od, key, hash);
1562-
_PyErr_ChainExceptions(exc, val, tb);
1561+
_PyErr_ChainExceptions1(exc);
15631562
}
15641563
}
15651564
return res;

0 commit comments

Comments
 (0)
0