fix: fix issue when there is no main section in the ini file
This commit is contained in:
parent
260801d4af
commit
53284fc1a5
1 changed files with 1 additions and 1 deletions
|
|
@ -49,7 +49,7 @@ def initialize_ini_config_default_values_if_not_present(
|
|||
updater = ConfigUpdater()
|
||||
updater.read(ini_path)
|
||||
|
||||
if not updater[section][option].value.strip():
|
||||
if option not in updater[section] or not updater[section][option].value.strip():
|
||||
updater[section][option] = default_val
|
||||
dump_config()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue