mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-16 03:54:27 +05:00
feat(backup): integrate backup functionality into multiple extensions and config management
This commit is contained in:
@@ -73,7 +73,7 @@ def add_config_section_at_top(section: str, instances: List[InstanceType]) -> No
|
||||
tmp.writelines(org_content)
|
||||
|
||||
cfg_file.unlink()
|
||||
shutil.move(tmp_cfg_path, cfg_file)
|
||||
shutil.move(tmp_cfg_path.as_posix(), cfg_file)
|
||||
|
||||
Logger.print_ok("OK!")
|
||||
|
||||
@@ -81,7 +81,7 @@ def add_config_section_at_top(section: str, instances: List[InstanceType]) -> No
|
||||
def remove_config_section(
|
||||
section: str, instances: List[InstanceType]
|
||||
) -> List[InstanceType]:
|
||||
removed_from: List[instances] = []
|
||||
removed_from: List[InstanceType] = []
|
||||
for instance in instances:
|
||||
cfg_file = instance.cfg_file
|
||||
Logger.print_status(f"Remove section '[{section}]' from '{cfg_file}' ...")
|
||||
|
||||
Reference in New Issue
Block a user