Message299579
PyObject *exception, *value, *tb;
PyErr_Fetch(&exception, &value, &tb);
/* PyObject_IsSubclass() can recurse and therefore is
not safe (see test_bad_getattr in test.pickletester). */
res = PyType_IsSubtype((PyTypeObject *)err, (PyTypeObject *)exc);
/* This function must not fail, so print the error here */
if (res == -1) {
PyErr_WriteUnraisable(err);
res = 0;
}
PyErr_Restore(exception, value, tb);
According to the comment, there was previously a call to PyObject_IsSubclass() involved which could fail, but since it was replaced with a call to PyType_IsSubtype(), it can no longer fail.
See pull request. |
|
Date |
User |
Action |
Args |
2017-07-31 19:24:27 | scoder | set | recipients:
+ scoder |
2017-07-31 19:24:27 | scoder | set | messageid: <1501529067.63.0.557215021907.issue31091@psf.upfronthosting.co.za> |
2017-07-31 19:24:27 | scoder | link | issue31091 messages |
2017-07-31 19:24:27 | scoder | create | |
|