mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Bad copypasta: logger doesn't exists in that context...
This commit is contained in:
parent
d9990cd818
commit
e273195504
1 changed files with 2 additions and 2 deletions
|
@ -159,7 +159,7 @@ ynh_add_protected_uris() {
|
||||||
ynh_app_setting()
|
ynh_app_setting()
|
||||||
{
|
{
|
||||||
ACTION="$1" APP="$2" KEY="$3" VALUE="${4:-}" python - <<EOF
|
ACTION="$1" APP="$2" KEY="$3" VALUE="${4:-}" python - <<EOF
|
||||||
import os, yaml
|
import os, yaml, sys
|
||||||
app, action = os.environ['APP'], os.environ['ACTION'].lower()
|
app, action = os.environ['APP'], os.environ['ACTION'].lower()
|
||||||
key, value = os.environ['KEY'], os.environ.get('VALUE', None)
|
key, value = os.environ['KEY'], os.environ.get('VALUE', None)
|
||||||
setting_file = "/etc/yunohost/apps/%s/settings.yml" % app
|
setting_file = "/etc/yunohost/apps/%s/settings.yml" % app
|
||||||
|
@ -177,7 +177,7 @@ else:
|
||||||
if key in ['redirected_urls', 'redirected_regex']:
|
if key in ['redirected_urls', 'redirected_regex']:
|
||||||
value = yaml.load(value)
|
value = yaml.load(value)
|
||||||
if key in ["unprotected_uris", "unprotected_regex", "protected_uris", "protected_regex"]:
|
if key in ["unprotected_uris", "unprotected_regex", "protected_uris", "protected_regex"]:
|
||||||
logger.warning("/!\\ Packagers! This app is using the legacy permission system. Please delete these legacy settings and use the new helpers 'ynh_permission_{create,urls,update,delete}' and the 'visitors' group to manage public/private access.")
|
sys.stderr.write("/!\\ Packagers! This app is using the legacy permission system. Please delete these legacy settings and use the new helpers 'ynh_permission_{create,urls,update,delete}' and the 'visitors' group to manage public/private access.\n")
|
||||||
settings[key] = value
|
settings[key] = value
|
||||||
else:
|
else:
|
||||||
raise ValueError("action should either be get, set or delete")
|
raise ValueError("action should either be get, set or delete")
|
||||||
|
|
Loading…
Add table
Reference in a new issue