summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/errors.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/errors.c b/Python/errors.c
index 6baa229..4656fb2 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -1321,7 +1321,7 @@ _PyErr_WriteUnraisableDefaultHook(PyObject *args)
{
PyThreadState *tstate = _PyThreadState_GET();
- if (Py_TYPE(args) != &UnraisableHookArgsType) {
+ if (!Py_IS_TYPE(args, &UnraisableHookArgsType)) {
_PyErr_SetString(tstate, PyExc_TypeError,
"sys.unraisablehook argument type "
"must be UnraisableHookArgs");