зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1583353 - [mozbuild] Forward unrecognized kwargs to underlying class in MozbuildObject.from_environment(), r=firefox-build-system-reviewers,mshal
This allows subclasses of MozbuildObject to define additional instance arguments and still use 'from_environment'. Differential Revision: https://phabricator.services.mozilla.com/D51174 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
0b1bb56b96
Коммит
5b57c3d580
|
@ -109,7 +109,7 @@ class MozbuildObject(ProcessExecutionMixin):
|
|||
self._virtualenv_manager = None
|
||||
|
||||
@classmethod
|
||||
def from_environment(cls, cwd=None, detect_virtualenv_mozinfo=True):
|
||||
def from_environment(cls, cwd=None, detect_virtualenv_mozinfo=True, **kwargs):
|
||||
"""Create a MozbuildObject by detecting the proper one from the env.
|
||||
|
||||
This examines environment state like the current working directory and
|
||||
|
@ -186,7 +186,7 @@ class MozbuildObject(ProcessExecutionMixin):
|
|||
# If we can't resolve topobjdir, oh well. We'll figure out when we need
|
||||
# one.
|
||||
return cls(topsrcdir, None, None, topobjdir=topobjdir,
|
||||
mozconfig=mozconfig)
|
||||
mozconfig=mozconfig, **kwargs)
|
||||
|
||||
def resolve_mozconfig_topobjdir(self, default=None):
|
||||
topobjdir = self.mozconfig['topobjdir'] or default
|
||||
|
|
Загрузка…
Ссылка в новой задаче