Skip to content

Commit

Permalink
feat(py): add warnings method to Rules object
Browse files Browse the repository at this point in the history
  • Loading branch information
plusvic committed Aug 16, 2023
1 parent b35f967 commit 20c6bbc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions yara-x-py/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ impl Rules {
.serialize_into(f)
.map_err(|err| PyIOError::new_err(err.to_string()))
}

fn warnings(&self) -> Vec<String> {
self.inner.rules.warnings().iter().map(|w| w.to_string()).collect()
}
}

/// Python module for compiling YARA rules and scanning data with them.
Expand Down

0 comments on commit 20c6bbc

Please sign in to comment.