Message299579
| Author |
scoder |
| Recipients |
scoder |
| Date |
2017年07月31日.19:24:27 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1501529067.63.0.557215021907.issue31091@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|