Skip to content

Commit 469d486

Browse files
committed
Refactor signal checking in future collection to simplify error handling
1 parent ada25e8 commit 469d486

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/utils.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ use datafusion_ffi::table_provider::{FFI_TableProvider, ForeignTableProvider};
2828
use pyo3::exceptions::PyValueError;
2929
use pyo3::prelude::*;
3030
use pyo3::types::PyCapsule;
31-
use pyo3::PyErr;
3231
use tokio::runtime::Runtime;
3332
use tokio::task::JoinHandle;
3433
use tokio::time::sleep;
@@ -87,13 +86,9 @@ where
8786
res = &mut fut => break Ok(res),
8887
_ = sleep(INTERVAL_CHECK_SIGNALS) => {
8988
Python::attach(|py| {
90-
if let Some(err) = PyErr::take(py) {
91-
Err(err)
92-
} else {
9389
let code = CString::new("pass").unwrap();
9490
py.run(code.as_c_str(), None, None)?;
9591
py.check_signals()
96-
}
9792
})?;
9893
}
9994
}

0 commit comments

Comments
 (0)