confighelper: add a setoption method

This should only be used for internally generated configuration
that may change during runtime.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-03-27 07:17:07 -04:00
parent 93b62236de
commit 54081612ca
No known key found for this signature in database
GPG Key ID: 7027245FBBDDF59A
1 changed files with 3 additions and 0 deletions

View File

@ -72,6 +72,9 @@ class ConfigHelper:
def has_option(self, option: str) -> bool:
return self.config.has_option(self.section, option)
def set_option(self, option: str, value: str) -> None:
self.config[self.section][option] = value
def get_name(self) -> str:
return self.section