Index: Python/errors.c =================================================================== --- Python/errors.c (revision 62102) +++ Python/errors.c (working copy) @@ -108,7 +108,14 @@ if (PyExceptionClass_Check(err) && PyExceptionClass_Check(exc)) { /* problems here!? not sure PyObject_IsSubclass expects to be called with an exception pending... */ - return PyObject_IsSubclass(err, exc); + int res = PyObject_IsSubclass(err, exc); + /* This function must not fail, so print the error here */ + if (res == -1) { + PyErr_WriteUnraisable(err); + /* return arbitrary value */ + res = 0; + } + return res; } return err == exc;

AltStyle によって変換されたページ (->オリジナル) /