Bug 1405808 - [mozlog] Default manifest groups to empty dict in errorsummary formatter, r?gbrown draft
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Thu, 05 Oct 2017 09:07:46 -0400
changeset 675537 4065303d83b66ad923349c8b491c94f17b6c3b4b
parent 675508 53bbdaaa2b8c1819061be26101b075c081b23260
child 734630 480d9a0869ed0a77ba521b704c8e6d47afaedee0
push id83159
push userahalberstadt@mozilla.com
push dateThu, 05 Oct 2017 13:26:10 +0000
reviewersgbrown
bugs1405808
milestone58.0a1
Bug 1405808 - [mozlog] Default manifest groups to empty dict in errorsummary formatter, r?gbrown This fixes an exception when a test_status/test_end is logged before a suite_start. This case should be an error anyway, but might as well fix this to keep the logs looking clean. MozReview-Commit-ID: 2TlWlSmczwH
testing/mozbase/mozlog/mozlog/formatters/errorsummary.py
--- a/testing/mozbase/mozlog/mozlog/formatters/errorsummary.py
+++ b/testing/mozbase/mozlog/mozlog/formatters/errorsummary.py
@@ -5,17 +5,17 @@
 import json
 
 from base import BaseFormatter
 
 
 class ErrorSummaryFormatter(BaseFormatter):
 
     def __init__(self):
-        self.groups = None
+        self.groups = {}
         self.line_count = 0
 
     def __call__(self, data):
         rv = BaseFormatter.__call__(self, data)
         self.line_count += 1
         return rv
 
     def _output(self, data_type, data):