From c46c5a8fa14f92fa744e7e1cc51ad3c4b9b8a91a Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Tue, 4 Oct 2016 10:58:05 -0700 Subject: [PATCH] Bug 1286900 - Set env explicitly because mozharness; r=me partial_env only works if the class inherits from some other base class, which apparently not all callers of this method do. So just pass a copy of the environ dict with PYTHONUNBUFFERED added. MozReview-Commit-ID: Ag75x28NR4D --HG-- extra : rebase_source : f19b2be2db0a4b321542cc353a4599481ba60146 --- testing/mozharness/mozharness/base/vcs/mercurial.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testing/mozharness/mozharness/base/vcs/mercurial.py b/testing/mozharness/mozharness/base/vcs/mercurial.py index b3ca8f5de6db..8362cc5d7fe2 100755 --- a/testing/mozharness/mozharness/base/vcs/mercurial.py +++ b/testing/mozharness/mozharness/base/vcs/mercurial.py @@ -388,8 +388,9 @@ class MercurialVCS(ScriptMixin, LogMixin, TransferMixin): parser = RepositoryUpdateRevisionParser(config=self.config, log_obj=self.log_obj) - if self.run_command(args, output_parser=parser, - partial_env={'PYTHONUNBUFFERED': '1'}): + env = dict(os.environ) + env[b'PYTHONUNBUFFERED'] = b'1' + if self.run_command(args, output_parser=parser, env=env): raise VCSException('repo checkout failed!') if not parser.revision: