mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
event: Clear exception flag after trying asyncio exception import
This commit is contained in:
parent
5095778324
commit
068ceaaf58
@ -125,6 +125,9 @@ static PyObject *get_done_result(const AsyncFuture *future) {
|
|||||||
exc_type = PyObject_GetAttrString(module, "CancelledError");
|
exc_type = PyObject_GetAttrString(module, "CancelledError");
|
||||||
Py_DECREF(module);
|
Py_DECREF(module);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
PyErr_Clear();
|
||||||
|
}
|
||||||
// If we can't get that, we should pretend and make our own.
|
// If we can't get that, we should pretend and make our own.
|
||||||
if (exc_type == nullptr) {
|
if (exc_type == nullptr) {
|
||||||
exc_type = PyErr_NewExceptionWithDoc((char*)"concurrent.futures._base.CancelledError",
|
exc_type = PyErr_NewExceptionWithDoc((char*)"concurrent.futures._base.CancelledError",
|
||||||
@ -218,6 +221,9 @@ result(PyObject *timeout) const {
|
|||||||
exc_type = PyObject_GetAttrString(module, "TimeoutError");
|
exc_type = PyObject_GetAttrString(module, "TimeoutError");
|
||||||
Py_DECREF(module);
|
Py_DECREF(module);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
PyErr_Clear();
|
||||||
|
}
|
||||||
// If we can't get that, we should pretend and make our own.
|
// If we can't get that, we should pretend and make our own.
|
||||||
if (exc_type == nullptr) {
|
if (exc_type == nullptr) {
|
||||||
exc_type = PyErr_NewExceptionWithDoc((char*)"concurrent.futures._base.TimeoutError",
|
exc_type = PyErr_NewExceptionWithDoc((char*)"concurrent.futures._base.TimeoutError",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user