summaryrefslogtreecommitdiffstats
path: root/Objects/exceptions.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-02-25 15:59:46 (GMT)
committerGitHub <noreply@github.com>2019-02-25 15:59:46 (GMT)
commita24107b04c1277e3c1105f98aff5bfa3a98b33a0 (patch)
tree55aa5a700e08e3ba27b0361df2b1043be5c4701a /Objects/exceptions.c
parenta180b007d96fe68b32f11dec720fbd0cd5b6758a (diff)
downloadcpython-a24107b04c1277e3c1105f98aff5bfa3a98b33a0.zip
cpython-a24107b04c1277e3c1105f98aff5bfa3a98b33a0.tar.gz
cpython-a24107b04c1277e3c1105f98aff5bfa3a98b33a0.tar.bz2
bpo-35459: Use PyDict_GetItemWithError() instead of PyDict_GetItem(). (GH-11112)
Diffstat (limited to 'Objects/exceptions.c')
-rw-r--r--Objects/exceptions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 75ede1c..ad2a54a 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;