mirror of
https://github.com/python/cpython.git
synced 2025-10-16 19:57:59 +00:00
Check for exceptions set by PyDict_GetItem().
This commit is contained in:
parent
811c4e0b7c
commit
fbfe093607
1 changed files with 2 additions and 0 deletions
|
@ -959,6 +959,8 @@ compiler_add_o(struct compiler *c, PyObject *dict, PyObject *o)
|
||||||
|
|
||||||
v = PyDict_GetItem(dict, t);
|
v = PyDict_GetItem(dict, t);
|
||||||
if (!v) {
|
if (!v) {
|
||||||
|
if (PyErr_Occurred())
|
||||||
|
return -1;
|
||||||
arg = PyDict_Size(dict);
|
arg = PyDict_Size(dict);
|
||||||
v = PyInt_FromLong(arg);
|
v = PyInt_FromLong(arg);
|
||||||
if (!v) {
|
if (!v) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue