From e01859ffc4b8aa6759adc75ff8920eff59d23026 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 27 Apr 2020 20:57:38 +0200 Subject: [PATCH] Fix tests --- src/yunohost/app.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 45cad35b8..2ab729a37 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -166,7 +166,7 @@ def _app_upgradable(app_infos): upgrade_only_if_version_changes = app_infos["manifest"].get('integration', {}).get("upgrade_only_if_version_changes", None) is True installed_version = version.parse(app_infos.get("version", "0~ynh0")) version_in_catalog = version.parse(app_infos.get("from_catalog", {}).get("manifest", {}).get("version", "0~ynh0")) - + if app_is_in_catalog and '~ynh' in str(installed_version) and '~ynh' in str(version_in_catalog): if upgrade_only_if_version_changes and installed_version < version_in_catalog: return "yes" @@ -480,7 +480,7 @@ def app_upgrade(app=[], url=None, file=None, force=False): logger.success(m18n.n('app_already_up_to_date', app=app_instance_name)) continue -# Manage upgrade type and avoid any upgrade if there is nothing to do + # Manage upgrade type and avoid any upgrade if there is nothing to do upgrade_type = "UNKNOWN" upgrade_only_if_version_changes = manifest.get('integration', {}).get("upgrade_only_if_version_changes", None) is True # Get current_version and new version @@ -533,8 +533,8 @@ def app_upgrade(app=[], url=None, file=None, force=False): env_dict["YNH_APP_INSTANCE_NAME"] = app_instance_name env_dict["YNH_APP_INSTANCE_NUMBER"] = str(app_instance_nb) env_dict["YNH_APP_UPGRADE_TYPE"] = upgrade_type - env_dict["YNH_APP_MANIFEST_VERSION"] = app_new_version - env_dict["YNH_APP_CURRENT_VERSION"] = app_current_version + env_dict["YNH_APP_MANIFEST_VERSION"] = str(app_new_version) + env_dict["YNH_APP_CURRENT_VERSION"] = str(app_current_version) # Start register change on system related_to = [('app', app_instance_name)]