From 197ad2c58580bcf95ac6e1cbe6193b3257c045b2 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Tue, 22 Aug 2017 20:29:37 -0700 Subject: [PATCH] Bug 1392886 - Don't destroy reference to "mach" module; r=mshal "mach" in this scope is both the mach module and the driver instance. Let's change the latter's variable name so we can access the mach module. MozReview-Commit-ID: Db6sxDFl2oo --HG-- extra : rebase_source : 0a51c7514cfdba40483b3b9b361cd03b8000c2c9 --- build/mach_bootstrap.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/build/mach_bootstrap.py b/build/mach_bootstrap.py index 7c95c4bd9c60..ac64854a729d 100644 --- a/build/mach_bootstrap.py +++ b/build/mach_bootstrap.py @@ -284,23 +284,23 @@ def bootstrap(topsrcdir, mozilla_dir=None): raise AttributeError(key) - mach = mach.main.Mach(os.getcwd()) - mach.populate_context_handler = populate_context + driver = mach.main.Mach(os.getcwd()) + driver.populate_context_handler = populate_context - if not mach.settings_paths: + if not driver.settings_paths: # default global machrc location - mach.settings_paths.append(get_state_dir()[0]) + driver.settings_paths.append(get_state_dir()[0]) # always load local repository configuration - mach.settings_paths.append(mozilla_dir) + driver.settings_paths.append(mozilla_dir) for category, meta in CATEGORIES.items(): - mach.define_category(category, meta['short'], meta['long'], + driver.define_category(category, meta['short'], meta['long'], meta['priority']) for path in MACH_MODULES: - mach.load_commands_from_file(os.path.join(mozilla_dir, path)) + driver.load_commands_from_file(os.path.join(mozilla_dir, path)) - return mach + return driver # Hook import such that .pyc/.pyo files without a corresponding .py file in