From 33fab1c99f1775da0a32dcf7072be13a5cbd3c59 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 22 Mar 2021 20:45:03 +0100 Subject: [PATCH] Be more robust against non-int values for level in app catalog (e.g. for apps 'inprogress' for which level is '?') --- src/yunohost/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 9d53df815..62e4ffd59 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -257,8 +257,9 @@ def _app_upgradable(app_infos): return "url_required" # Do not advertise upgrades for bad-quality apps + level = app_in_catalog.get("level", -1) if ( - not app_in_catalog.get("level", -1) >= 5 + not (isinstance(level, int) and level >= 5) or app_in_catalog.get("state") != "working" ): return "bad_quality"