Bug 1373789 - Handle some kinds of malformed lcov lines better. r=chmanchester
authorMarco Castelluccio <mcastelluccio@mozilla.com>
Fri, 16 Jun 2017 20:16:33 +0100
changeset 364512 aa6b6b627a549c9ef04caf2ff04488084b84cf39
parent 364511 a0a703ef8e421c292a63b34d72b8a309e053cf03
child 364513 56896524a81609ca509846235c104ef6b4c5c8d4
push id32043
push userarchaeopteryx@coole-files.de
push dateSat, 17 Jun 2017 20:28:42 +0000
treeherdermozilla-central@0ef3bfc9f4b8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1373789
milestone56.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 1373789 - Handle some kinds of malformed lcov lines better. r=chmanchester
python/mozbuild/mozbuild/codecoverage/lcov_rewriter.py
--- a/python/mozbuild/mozbuild/codecoverage/lcov_rewriter.py
+++ b/python/mozbuild/mozbuild/codecoverage/lcov_rewriter.py
@@ -288,16 +288,20 @@ class LcovFile(object):
             except ValueError:
                 print("Encountered an error at line %d:\n%s" %
                       (count + 1, line))
                 raise
             except KeyError:
                 print("Invalid lcov line start at %s:%d:\n%s" %
                       (lcov_fh.name, count + 1, line))
                 raise
+            except TypeError:
+                print("Invalid lcov line start at %s:%d:\n%s" %
+                      (lcov_fh.name, count + 1, line))
+                raise
 
     def print_file(self, fh):
         for record in self.records:
             fh.write(self.format_record(record))
             fh.write('\n')
 
     def format_record(self, record):
         out_lines = []