summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/dictobject.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 36c710e..e0cb8ac 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -2684,8 +2684,10 @@ _PyDict_GetItemId(PyObject *dp, struct _Py_Identifier *key)
{
PyObject *kv;
kv = _PyUnicode_FromId(key); /* borrowed */
- if (kv == NULL)
+ if (kv == NULL) {
+ PyErr_Clear();
return NULL;
+ }
return PyDict_GetItem(dp, kv);
}