diff options
Diffstat (limited to 'python/mach_bootstrap.py')
-rw-r--r-- | python/mach_bootstrap.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py index 9b36d3fec31..2c83c6492e7 100644 --- a/python/mach_bootstrap.py +++ b/python/mach_bootstrap.py @@ -223,14 +223,17 @@ class DummyContext(object): pass -def bootstrap_command_only(topdir): - # See if we're inside a Firefox checkout. +def is_firefox_checkout(topdir): parentdir = os.path.normpath(os.path.join(topdir, '..')) is_firefox = os.path.isfile(os.path.join(parentdir, 'build/mach_bootstrap.py')) + return is_firefox + + +def bootstrap_command_only(topdir): # we should activate the venv before importing servo.boostrap # because the module requires non-standard python packages - _activate_virtualenv(topdir, is_firefox) + _activate_virtualenv(topdir, is_firefox_checkout(topdir)) from servo.bootstrap import bootstrap @@ -273,10 +276,7 @@ def bootstrap(topdir): print('You are running Python', platform.python_version()) sys.exit(1) - # See if we're inside a Firefox checkout. - parentdir = os.path.normpath(os.path.join(topdir, '..')) - is_firefox = os.path.isfile(os.path.join(parentdir, - 'build/mach_bootstrap.py')) + is_firefox = is_firefox_checkout(topdir) _activate_virtualenv(topdir, is_firefox) |