diff --git a/locales/en.json b/locales/en.json index 9042ab063..d0eb794c3 100644 --- a/locales/en.json +++ b/locales/en.json @@ -488,7 +488,7 @@ "log_user_update": "Update info for user '{}'", "log_settings_set": "Apply settings", "log_settings_reset": "Reset setting", - "log_settings_reset_all": "Reset all setting", + "log_settings_reset_all": "Reset all settings", "mail_alias_remove_failed": "Could not remove e-mail alias '{mail}'", "mail_domain_unknown": "Invalid e-mail address for domain '{domain}'. Please, use a domain administrated by this server.", "mail_forward_remove_failed": "Could not remove e-mail forwarding '{mail}'", diff --git a/src/settings.py b/src/settings.py index d15ab371f..a5a0d3625 100644 --- a/src/settings.py +++ b/src/settings.py @@ -15,10 +15,6 @@ logger = getActionLogger("yunohost.settings") SETTINGS_PATH = "/etc/yunohost/settings.yml" -BOOLEANS = { - "True": True, - "False": False, -} def settings_get(key="", full=False, export=False): @@ -136,8 +132,8 @@ class SettingsConfigPanel(ConfigPanel): return self.config # Dirty hack to let settings_get() to work from a python script - if isinstance(result, str) and result in BOOLEANS: - result = BOOLEANS[result] + if isinstance(result, str) and result in ["True", "False"]: + result = bool(result) return result