mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Prevent to get/set non-installed app setting
This commit is contained in:
parent
999a61d2b2
commit
264e202347
1 changed files with 4 additions and 1 deletions
|
@ -781,8 +781,11 @@ def app_setting(app, key, value=None, delete=False):
|
||||||
delete -- Delete the key
|
delete -- Delete the key
|
||||||
|
|
||||||
"""
|
"""
|
||||||
settings_file = apps_setting_path + app +'/settings.yml'
|
if not _is_installed(app):
|
||||||
|
raise MoulinetteError(errno.EINVAL,
|
||||||
|
m18n.n('app_not_installed', app))
|
||||||
|
|
||||||
|
settings_file = apps_setting_path + app +'/settings.yml'
|
||||||
try:
|
try:
|
||||||
with open(settings_file) as f:
|
with open(settings_file) as f:
|
||||||
app_settings = yaml.load(f)
|
app_settings = yaml.load(f)
|
||||||
|
|
Loading…
Add table
Reference in a new issue