Skip to content

Commit f10652c

Browse files
committed
fix: propagate error correctly from wait_for_future in PySessionContext methods
1 parent b778911 commit f10652c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/context.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ impl PySessionContext {
786786
.register_csv_from_multiple_paths(&name_owned, paths, options)
787787
.await
788788
};
789-
wait_for_future(py, result_future)?
789+
wait_for_future(py, result_future)??
790790
} else {
791791
let path = path.extract::<String>()?;
792792
let ctx = self.ctx.clone();
@@ -810,7 +810,7 @@ impl PySessionContext {
810810

811811
ctx.register_csv(&name_owned, &path, options).await
812812
};
813-
wait_for_future(py, result_future)?
813+
wait_for_future(py, result_future)??
814814
};
815815

816816
Ok(())
@@ -870,7 +870,7 @@ impl PySessionContext {
870870

871871
ctx.register_json(&name_owned, &path_owned, options).await
872872
};
873-
let _ = wait_for_future(py, result_future)?;
873+
let rresult = wait_for_future(py, result_future)?;
874874

875875
Ok(())
876876
}

0 commit comments

Comments
 (0)