From 64fe357995ff5b507be0e3907a28cc6ade14217d Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Fri, 22 Jun 2018 04:54:56 +0200 Subject: [PATCH] [mod] compress code a bit --- src/yunohost/app.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index bef227db7..d310b44de 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -1374,15 +1374,10 @@ def app_action_list(app_id): raise MoulinetteError(errno.ENOPKG, m18n.n('app_not_installed', app=app_id)) - actions = os.path.join( APPS_SETTING_PATH, app_id, 'actions.json') - - if not os.path.exists(actions): - return { - "actions": [], - } + actions = os.path.join(APPS_SETTING_PATH, app_id, 'actions.json') return { - "actions": read_json(actions), + "actions": read_json(actions) if os.path.exists(actions) else [], }