diff --git a/pr_testing/_helper_functions.sh b/pr_testing/_helper_functions.sh index f330971cb0a0..516ee0c678a2 100755 --- a/pr_testing/_helper_functions.sh +++ b/pr_testing/_helper_functions.sh @@ -24,7 +24,7 @@ function get_cached_GH_JSON (){ # TODO retry if curl fails do to external glitch >&2 echo "Downloading PR ${PR}" for i in 0 1 2 3 4 ; do - ${CMSBOT_PYTHON_CMD} -c "import github_utils,json;data=github_utils.get_pr('${REPO}', '${PR_NR}');print(json.dumps(data))" > ${GH_JSON_PATH} || continue + PYTHONPATH=${PR_TESTING_DIR}/..${PYTHONPATH:+:$PYTHONPATH} ${CMSBOT_PYTHON_CMD} -c "import github_utils,json;data=github_utils.get_pr('${REPO}', '${PR_NR}');print(json.dumps(data))" > ${GH_JSON_PATH} || continue echo ${GH_JSON_PATH} break done diff --git a/pr_testing/merge_cms-bot_pr.sh b/pr_testing/merge_cms-bot_pr.sh index 981dfb014d97..c96df4fa2538 100755 --- a/pr_testing/merge_cms-bot_pr.sh +++ b/pr_testing/merge_cms-bot_pr.sh @@ -5,7 +5,6 @@ # Constants SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" # Absolute path to script CMS_BOT_DIR=$(dirname ${SCRIPTPATH}) # To get CMS_BOT dir path -export PYTHONPATH=$CMS_BOT_DIR:$PYTHONPATH PR_TESTING_DIR=${CMS_BOT_DIR}/pr_testing source ${PR_TESTING_DIR}/_helper_functions.sh # general helper functions