From 101d3beebf19f3657466da69aba65358e67bcf30 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 25 Nov 2019 18:26:26 +0100 Subject: [PATCH] Simplify app_list, don't call app_info (which itself calls app_list...) just to fetch the label from the settings --- src/yunohost/app.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index e2541d03e..0e4a473b4 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -142,15 +142,10 @@ def app_list(filter=None, raw=False, installed=False, with_backup=False): list_dict[app_id] = app_info_dict else: - label = None - if app_installed: - app_info_dict_raw = app_info(app=app_id, raw=True) - label = app_info_dict_raw['settings']['label'] - list_dict.append({ 'id': app_id, 'name': app_info_dict['manifest']['name'], - 'label': label, + 'label': _get_app_settings(app_id).get("label", "?") if app_installed else None, 'description': _value_for_locale(app_info_dict['manifest']['description']), # FIXME: Temporarly allow undefined license 'license': app_info_dict['manifest'].get('license', m18n.n('license_undefined')),