Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/pym.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use pyo3::prelude::*;

/// Exec python scripts as filter
pub fn exec(module: &str) -> Result<Vec<String>, crate::Error> {
pyo3::prepare_freethreaded_python();
let script = load_script(&module)?;
let cache = Cache::new()?;

Expand All @@ -20,7 +21,7 @@ pub fn exec(module: &str) -> Result<Vec<String>, crate::Error> {
let stags = serde_json::to_string(&cache.get_tags()?)?;

// ret
let res: Vec<String> = pym.call1("plan", (sps, stags))?.extract()?;
let res: Vec<String> = pym.getattr("plan")?.call1((sps, stags))?.extract()?;

Ok(res)
}