mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-25 08:43:36 +05:00
fix: update scp integration for more robust config handling (#535)
* chore: remove scp * Squashed 'kiauh/core/submodules/simple_config_parser/' content from commit abee21c git-subtree-dir: kiauh/core/submodules/simple_config_parser git-subtree-split: abee21c08658be4529028844304df60650c09afa * Squashed 'kiauh/core/submodules/simple_config_parser/' changes from abee21c..aa0302b aa0302b fix: fix missing newline chars in raw strings git-subtree-dir: kiauh/core/submodules/simple_config_parser git-subtree-split: aa0302b02b56b252ed88fd2db88ee878a5bb7b5b * Squashed 'kiauh/core/submodules/simple_config_parser/' changes from aa0302b..ef52958 ef52958 refactor: conditionally add empty line when adding new section git-subtree-dir: kiauh/core/submodules/simple_config_parser git-subtree-split: ef529580f469ef020135cb03e250fcd4e0d70acf * fix: update scp integration for more robust cfg modification Signed-off-by: Dominik Willner <th33xitus@gmail.com> --------- Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -122,10 +122,10 @@ class GcodeShellCmdExtension(BaseExtension):
|
||||
for cfg_file in cfg_files:
|
||||
Logger.print_status(f"Include shell_command.cfg in '{cfg_file}' ...")
|
||||
scp = SimpleConfigParser()
|
||||
scp.read(cfg_file)
|
||||
scp.read_file(cfg_file)
|
||||
if scp.has_section(section):
|
||||
Logger.print_info("Section already defined! Skipping ...")
|
||||
continue
|
||||
scp.add_section(section)
|
||||
scp.write(cfg_file)
|
||||
scp.write_file(cfg_file)
|
||||
Logger.print_ok("Done!")
|
||||
|
||||
Reference in New Issue
Block a user