improve version check & rename check key

Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
This commit is contained in:
Axolotle 2022-12-04 13:23:32 +01:00 committed by GitHub
parent 92608c6ee3
commit d4d739bbe2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2462,11 +2462,11 @@ def _check_manifest_requirements(
) )
# Yunohost version # Yunohost version
required_yunohost_version = manifest["integration"].get("yunohost", "4.3") required_yunohost_version = manifest["integration"].get("yunohost", "4.3").strip(">= ")
current_yunohost_version = get_ynh_package_version("yunohost")["version"] current_yunohost_version = get_ynh_package_version("yunohost")["version"]
yield ( yield (
"version", "required_yunohost_version",
version.parse(required_yunohost_version) version.parse(required_yunohost_version)
<= version.parse(current_yunohost_version), <= version.parse(current_yunohost_version),
{"current": current_yunohost_version, "required": required_yunohost_version}, {"current": current_yunohost_version, "required": required_yunohost_version},