Explicit that we wanna run this python code in 2.7, otherwise if you're in a python3 venv it may not find the yaml module

This commit is contained in:
Alexandre Aubin 2019-11-25 18:27:01 +01:00
parent 101d3beebf
commit 67bb386c39

View file

@ -158,7 +158,7 @@ ynh_add_protected_uris() {
#
ynh_app_setting()
{
ACTION="$1" APP="$2" KEY="$3" VALUE="${4:-}" python - <<EOF
ACTION="$1" APP="$2" KEY="$3" VALUE="${4:-}" python2.7 - <<EOF
import os, yaml, sys
app, action = os.environ['APP'], os.environ['ACTION'].lower()
key, value = os.environ['KEY'], os.environ.get('VALUE', None)