Bug 1629595 - Avoid rewriting .mozconfig.json in mixed-python environments. r=firefox-build-system-reviewers,rstewart

Differential Revision: https://phabricator.services.mozilla.com/D70708

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kartikaya Gupta 2020-04-14 17:47:48 +00:00
parent a5a90428ed
commit e9cc085269

View File

@ -1446,6 +1446,11 @@ class BuildDriver(MozbuildObject):
'topobjdir': self.topobjdir,
'mozconfig': self.mozconfig,
}, sort_keys=True, indent=2))
# json.dumps in python2 inserts some trailing whitespace while
# json.dumps in python3 does not, which defeats the FileAvoidWrite
# mechanism. Strip the trailing whitespace to avoid rewriting this
# file unnecessarily.
to_write = '\n'.join([line.rstrip() for line in to_write.splitlines()])
fh.write(to_write)
def _run_client_mk(self, target=None, line_handler=None, jobs=0,