aboutsummaryrefslogtreecommitdiffstats
path: root/python/mach_bootstrap.py
diff options
context:
space:
mode:
authorKagami Sascha Rosylight <saschanaz@outlook.com>2020-06-21 03:34:22 +0200
committerKagami Sascha Rosylight <saschanaz@outlook.com>2020-06-21 03:34:32 +0200
commitd01648d637a350af0cb81470f956cc5edd18a9a4 (patch)
tree348d75fe9d3e63fd4bb8ff2506db6606a12e56fd /python/mach_bootstrap.py
parentc953931621679f37fa31a1dc5f00ebb9f0c204e0 (diff)
downloadservo-d01648d637a350af0cb81470f956cc5edd18a9a4.tar.gz
servo-d01648d637a350af0cb81470f956cc5edd18a9a4.zip
Fix remaining flake8 warnings
Diffstat (limited to 'python/mach_bootstrap.py')
-rw-r--r--python/mach_bootstrap.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py
index 049dff4b7e7..0c5eb005694 100644
--- a/python/mach_bootstrap.py
+++ b/python/mach_bootstrap.py
@@ -155,7 +155,6 @@ def wptserve_path(is_firefox, topdir, *paths):
def _activate_virtualenv(topdir, is_firefox):
virtualenv_path = os.path.join(topdir, "python", "_virtualenv%d.%d" % (sys.version_info[0], sys.version_info[1]))
- check_exec_path = lambda path: path.startswith(virtualenv_path)
python = sys.executable # If there was no python, mach wouldn't have run at all!
if not python:
sys.exit('Failed to find python executable for starting virtualenv.')
@@ -177,7 +176,8 @@ def _activate_virtualenv(topdir, is_firefox):
exec(compile(open(activate_path).read(), activate_path, 'exec'), dict(__file__=activate_path))
- python = _get_exec_path(PYTHON_NAMES, is_valid_path=check_exec_path)
+ python = _get_exec_path(PYTHON_NAMES,
+ is_valid_path=lambda path: path.startswith(virtualenv_path))
if not python:
sys.exit("Python executable in virtualenv failed to activate.")