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:
parent
93b62236de
commit
54081612ca
|
@ -72,6 +72,9 @@ class ConfigHelper:
|
||||||
def has_option(self, option: str) -> bool:
|
def has_option(self, option: str) -> bool:
|
||||||
return self.config.has_option(self.section, option)
|
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:
|
def get_name(self) -> str:
|
||||||
return self.section
|
return self.section
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue