Skip to content
Snippets Groups Projects
Unverified Commit 1fd1856a authored by Mathieu Velten's avatar Mathieu Velten Committed by GitHub
Browse files

demo: check if we are in a virtualenv before overriding PYTHONPATH (#12916)

parent 7f92ac4c
No related branches found
No related tags found
No related merge requests found
Check if we are in a virtual environment before overriding the `PYTHONPATH` environment variable in the demo script.
......@@ -6,11 +6,12 @@ CWD=$(pwd)
cd "$DIR/.." || exit
PYTHONPATH=$(readlink -f "$(pwd)")
export PYTHONPATH
echo "$PYTHONPATH"
# Do not override PYTHONPATH if we are in a virtual env
if [ "$VIRTUAL_ENV" = "" ]; then
PYTHONPATH=$(readlink -f "$(pwd)")
export PYTHONPATH
echo "$PYTHONPATH"
fi
# Create servers which listen on HTTP at 808x and HTTPS at 848x.
for port in 8080 8081 8082; do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment