Bug 1647629 - Make infer static-analysis compatible with python3. r=sylvestre
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Tue, 23 Jun 2020 11:42:51 +0000
changeset 536877 18727b87e5091ceb4ac2894228e641c3fa8d41fb
parent 536876 1620ceeb178952785531dc2855157fef8c4e3f60
child 536878 3685f83e0dc032341ab9442f90bef92dd4aa7ea2
push id37533
push userdluca@mozilla.com
push dateTue, 23 Jun 2020 21:38:40 +0000
treeherdermozilla-central@d48aa0f0aa0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssylvestre
bugs1647629
milestone79.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1647629 - Make infer static-analysis compatible with python3. r=sylvestre Differential Revision: https://phabricator.services.mozilla.com/D80633
python/mozbuild/mozbuild/code-analysis/mach_commands.py
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -893,17 +893,17 @@ class StaticAnalysis(MachCommandBase):
         return java_sources
 
     def _get_infer_source_args(self, sources):
         '''Return the arguments to only analyze <sources>'''
         if not sources:
             return (None, [])
         # create a temporary file in which we place all sources
         # this is used by the analysis command to only analyze certain files
-        f = tempfile.NamedTemporaryFile()
+        f = tempfile.NamedTemporaryFile(mode="wt")
         for source in sources:
             f.write(source+'\n')
         f.flush()
         return (f, ['--changed-files-index', f.name])
 
     def _get_infer_config(self):
         '''Load the infer config file.'''
         checkers = []