From 5d489d9cb5ca6adf7c64e7d2e3c27fade3897abb Mon Sep 17 00:00:00 2001 From: EliterScripts Date: Tue, 9 Apr 2019 23:02:21 -0700 Subject: [PATCH] fixed MIAB python error --- setup/agreement.py | 4 ++-- setup/functions.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/agreement.py b/setup/agreement.py index 45c9612d..e9f39e20 100644 --- a/setup/agreement.py +++ b/setup/agreement.py @@ -16,7 +16,7 @@ def write_settings(config, env): f.write(rtyaml.dump(config)) def load_settings(env): - fn = os.path.join(env['STORAGE_ROOT'], 'settings.yaml') + fn = os.path( sys.argv[2] ) try: config = rtyaml.load(open(fn, "r")) if not isinstance(config, dict): raise ValueError() # caught below @@ -29,7 +29,7 @@ env = load_environment() if(sys.argv[2]): if( sys.argv[1] == "check" ): - yaml = rtyaml.load(open( os.path.join(env['STORAGE_ROOT'], 'settings.yaml') )) + yaml = rtyaml.load(open( sys.argv[2] )) if( yaml.get("mailinabox-agreement", True) ): print("true") diff --git a/setup/functions.sh b/setup/functions.sh index 400ab2eb..46a35fbb 100644 --- a/setup/functions.sh +++ b/setup/functions.sh @@ -274,7 +274,7 @@ function set_config_agreed { fi local current_directory="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - local yaml_agreed=$(python set "${current_directory}"/checkagree.py "${STORAGE_ROOT}/settings.yaml") + local yaml_agreed=$(python set "${current_directory}"/checkagree.py "${STORAGE_ROOT}settings.yaml") if [ "$yaml_agreed" == "true"]; then return 0 fi