From f21fbed2f72947d57b1d795589d0a9504e004d5c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 10 Jan 2023 00:42:40 +0100 Subject: [PATCH] configpanel: stop the madness of returning a 500 error when trying to load config panel 0.1 ... otherwise this will crash the new app info view ... --- locales/en.json | 1 - src/utils/config.py | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/locales/en.json b/locales/en.json index 1d4d37d92..e655acb83 100644 --- a/locales/en.json +++ b/locales/en.json @@ -162,7 +162,6 @@ "config_validate_email": "Should be a valid email", "config_validate_time": "Should be a valid time like HH:MM", "config_validate_url": "Should be a valid web URL", - "config_version_not_supported": "Config panel versions '{version}' are not supported.", "confirm_app_install_danger": "DANGER! This app is known to be still experimental (if not explicitly not working)! You should probably NOT install it unless you know what you are doing. NO SUPPORT will be provided if this app doesn't work or breaks your system... If you are willing to take that risk anyway, type '{answers}'", "confirm_app_install_thirdparty": "DANGER! This app is not part of YunoHost's app catalog. Installing third-party apps may compromise the integrity and security of your system. You should probably NOT install it unless you know what you are doing. NO SUPPORT will be provided if this app doesn't work or breaks your system... If you are willing to take that risk anyway, type '{answers}'", "confirm_app_install_warning": "Warning: This app may work, but is not well-integrated into YunoHost. Some features such as single sign-on and backup/restore might not be available. Install anyway? [{answers}] ", diff --git a/src/utils/config.py b/src/utils/config.py index 721da443b..da3c68ad8 100644 --- a/src/utils/config.py +++ b/src/utils/config.py @@ -479,9 +479,8 @@ class ConfigPanel: # Check TOML config panel is in a supported version if float(toml_config_panel["version"]) < CONFIG_PANEL_VERSION_SUPPORTED: - raise YunohostError( - "config_version_not_supported", version=toml_config_panel["version"] - ) + logger.error(f"Config panels version {toml_config_panel['version']} are not supported") + return None # Transform toml format into internal format format_description = {