mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-27 17:53:35 +05:00
refactor: log successfully added sections
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -48,6 +48,8 @@ def add_config_section(
|
|||||||
|
|
||||||
scp.write_file(cfg_file)
|
scp.write_file(cfg_file)
|
||||||
|
|
||||||
|
Logger.print_ok("OK!")
|
||||||
|
|
||||||
|
|
||||||
def add_config_section_at_top(section: str, instances: List[InstanceType]) -> None:
|
def add_config_section_at_top(section: str, instances: List[InstanceType]) -> None:
|
||||||
# TODO: this could be implemented natively in SimpleConfigParser
|
# TODO: this could be implemented natively in SimpleConfigParser
|
||||||
@@ -69,6 +71,8 @@ def add_config_section_at_top(section: str, instances: List[InstanceType]) -> No
|
|||||||
cfg_file.unlink()
|
cfg_file.unlink()
|
||||||
tmp_cfg_path.rename(cfg_file)
|
tmp_cfg_path.rename(cfg_file)
|
||||||
|
|
||||||
|
Logger.print_ok("OK!")
|
||||||
|
|
||||||
|
|
||||||
def remove_config_section(section: str, instances: List[InstanceType]) -> None:
|
def remove_config_section(section: str, instances: List[InstanceType]) -> None:
|
||||||
for instance in instances:
|
for instance in instances:
|
||||||
@@ -87,3 +91,5 @@ def remove_config_section(section: str, instances: List[InstanceType]) -> None:
|
|||||||
|
|
||||||
scp.remove_section(section)
|
scp.remove_section(section)
|
||||||
scp.write_file(cfg_file)
|
scp.write_file(cfg_file)
|
||||||
|
|
||||||
|
Logger.print_ok("OK!")
|
||||||
|
|||||||
Reference in New Issue
Block a user