1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-09-12 20:30:57 +00:00

Mark internal configuration options and sections with underscore

This commit is contained in:
Unrud 2020-02-19 09:50:27 +01:00
parent 0bda1f4c16
commit 5371be2b39
12 changed files with 58 additions and 63 deletions

View file

@ -42,11 +42,9 @@ def get_file_content(file_name):
def configuration_to_dict(configuration):
d = {}
for section in configuration.sections():
if configuration._schema[section].get("_internal", False):
continue
d[section] = {}
for option in configuration.options(section):
d[section][option] = configuration.get_raw(section, option)
return d
"""Convert configuration to a dict with raw values."""
return {section: {option: configuration.get_raw(section, option)
for option in configuration.options(section)
if not option.startswith("_")}
for section in configuration.sections()
if not section.startswith("_")}