aboutsummaryrefslogtreecommitdiffstats
path: root/python/mach_bootstrap.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/mach_bootstrap.py')
-rw-r--r--python/mach_bootstrap.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py
index 05b21c4fdfa..3960ba6f8e0 100644
--- a/python/mach_bootstrap.py
+++ b/python/mach_bootstrap.py
@@ -9,7 +9,6 @@ import platform
import subprocess
import sys
from distutils.spawn import find_executable
-from pipes import quote
SEARCH_PATHS = [
os.path.join("python", "mach"),
@@ -111,7 +110,11 @@ def _activate_virtualenv(topdir):
except (subprocess.CalledProcessError, OSError):
sys.exit("Python virtualenv failed to execute properly.")
- execfile(activate_path, dict(__file__=quote(activate_path)))
+ execfile(activate_path, dict(__file__=activate_path))
+
+ python = find_executable("python")
+ if python is None or not python.startswith(virtualenv_path):
+ sys.exit("Python virtualenv failed to activate.")
# TODO: Right now, we iteratively install all the requirements by invoking
# `pip install` each time. If it were the case that there were conflicting