mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[mod] compress code a bit
This commit is contained in:
parent
26f2741a7e
commit
64fe357995
1 changed files with 2 additions and 7 deletions
|
@ -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 [],
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue