feat(aurweb-config): add unset action and simplify

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-11-27 22:34:15 -08:00
parent 199622c53f
commit 0e938209af
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
3 changed files with 78 additions and 26 deletions

View file

@ -56,8 +56,13 @@ def get_section(section):
return _get_parser()[section]
def replace_key(section: str, option: str, value: Any) -> Any:
def unset_option(section: str, option: str) -> None:
_get_parser().remove_option(section, option)
def set_option(section: str, option: str, value: Any) -> None:
_get_parser().set(section, option, value)
return value
def save() -> None: