mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
quality: cleanup unused code
This commit is contained in:
parent
f3eef43d02
commit
d44b09cf12
1 changed files with 0 additions and 25 deletions
25
src/app.py
25
src/app.py
|
@ -1964,31 +1964,6 @@ ynh_app_config_run $1
|
||||||
return values
|
return values
|
||||||
|
|
||||||
|
|
||||||
def _get_app_actions(app_id):
|
|
||||||
"Get app config panel stored in json or in toml"
|
|
||||||
actions_toml_path = os.path.join(APPS_SETTING_PATH, app_id, "actions.toml")
|
|
||||||
actions_json_path = os.path.join(APPS_SETTING_PATH, app_id, "actions.json")
|
|
||||||
|
|
||||||
if os.path.exists(actions_toml_path):
|
|
||||||
toml_actions = toml.load(open(actions_toml_path, "r"), _dict=OrderedDict)
|
|
||||||
|
|
||||||
# transform toml format into json format
|
|
||||||
actions = []
|
|
||||||
|
|
||||||
for key, value in toml_actions.items():
|
|
||||||
action = dict(**value)
|
|
||||||
action["id"] = key
|
|
||||||
action["arguments"] = value.get("arguments", {})
|
|
||||||
actions.append(action)
|
|
||||||
|
|
||||||
return actions
|
|
||||||
|
|
||||||
elif os.path.exists(actions_json_path):
|
|
||||||
return json.load(open(actions_json_path))
|
|
||||||
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _get_app_settings(app):
|
def _get_app_settings(app):
|
||||||
"""
|
"""
|
||||||
Get settings of an installed app
|
Get settings of an installed app
|
||||||
|
|
Loading…
Add table
Reference in a new issue