1
0
Fork 0
mirror of synced 2024-06-02 18:54:41 +12:00

config_helper: Don't remove section when removing the last option

This is a synchronization nightmare as it is now,
so keep the section to avoid excessive checks.
This commit is contained in:
loathingKernel 2023-03-29 14:04:45 +03:00
parent 392ea81707
commit b1d438c34c
No known key found for this signature in database
GPG key ID: CE0C72D0B53821FD

View file

@ -32,13 +32,14 @@ def remove_option(app_name, option):
if _config.has_option(app_name, option):
_config.remove_option(app_name, option)
if _config.has_section(app_name) and not _config[app_name]:
_config.remove_section(app_name)
# if _config.has_section(app_name) and not _config[app_name]:
# _config.remove_section(app_name)
save_config()
def remove_section(app_name):
return
if _config.has_section(app_name):
_config.remove_section(app_name)
save_config()