Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New functions for retrieving and changing rule values #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Syoc
Copy link

@Syoc Syoc commented Nov 23, 2018

I use rule.py as a standalone library for parsing and bulk changing rules.
Here are 3 functions I have added to make my life easier
The header is fixed so change_header takes the rule, index to the header item and value to change it to.
change_option takes rule, name of the option and a value. It's just a combination of remove and add.
get_option takes a rule and a name. Used for checking option values. Will only return first found option with given name.

…nge_option(rule, name, value) and get_option(rule, name).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant