diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2019-02-25 15:59:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-25 15:59:46 (GMT) |
commit | a24107b04c1277e3c1105f98aff5bfa3a98b33a0 (patch) | |
tree | 55aa5a700e08e3ba27b0361df2b1043be5c4701a /Objects/exceptions.c | |
parent | a180b007d96fe68b32f11dec720fbd0cd5b6758a (diff) | |
download | cpython-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.c | 2 |
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; |