From a24107b04c1277e3c1105f98aff5bfa3a98b33a0 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 25 Feb 2019 17:59:46 +0200 Subject: bpo-35459: Use PyDict_GetItemWithError() instead of PyDict_GetItem(). (GH-11112) --- Objects/exceptions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Objects/exceptions.c') diff --git a/Objects/exceptions.c b/Objects/exceptions.c index 75ede1c9c5..ad2a54a2b6 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -975,7 +975,7 @@ OSError_new(PyTypeObject *type, PyObject *args, PyObject *kwds) if (myerrno && PyLong_Check(myerrno) && errnomap && (PyObject *) type == PyExc_OSError) { PyObject *newtype; - newtype = PyDict_GetItem(errnomap, myerrno); + newtype = PyDict_GetItemWithError(errnomap, myerrno); if (newtype) { assert(PyType_Check(newtype)); type = (PyTypeObject *) newtype; -- cgit v1.2.1