summaryrefslogtreecommitdiffstats
path: root/Modules/faulthandler.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-05-30 14:48:19 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-05-30 14:48:19 (GMT)
commitac5569b1fa483c50edca82bab1ab0a8a927ba86a (patch)
tree9eada65cbf98a2158fda4b3a668ad5ee5969f1c5 /Modules/faulthandler.c
parentbf2b3b72d370f866aa5b8f9077ff37e7c53de894 (diff)
parentfa494fd88384acc52cf9292d0c89e2961c8f747f (diff)
downloadcpython-ac5569b1fa483c50edca82bab1ab0a8a927ba86a.zip
cpython-ac5569b1fa483c50edca82bab1ab0a8a927ba86a.tar.gz
cpython-ac5569b1fa483c50edca82bab1ab0a8a927ba86a.tar.bz2
Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),
PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly.
Diffstat (limited to 'Modules/faulthandler.c')
-rw-r--r--Modules/faulthandler.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
index f53ea3f..530ddc7 100644
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -1115,8 +1115,8 @@ faulthandler_env_options(void)
has_key = PyDict_Contains(xoptions, key);
Py_DECREF(key);
- if (!has_key)
- return 0;
+ if (has_key <= 0)
+ return has_key;
}
module = PyImport_ImportModule("faulthandler");