refactor: log successfully added sections
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
1 parent
afeb2bf02e
commit
2897f38e4e
1 file changed
+6
@@ -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