Bug 1274611: handle empty error messages properly; r?gps draft
authorDustin J. Mitchell <dustin@mozilla.com>
Fri, 27 May 2016 22:19:54 +0000
changeset 372295 831616a98a69dcf2010df55cde53c725ab057123
parent 372294 22e1b4ba20b3288c3057675daf7c820a5f0314d7
child 372296 d945edad7a945daf9ec3b58e3c5f2d204b47855e
push id19498
push userdmitchell@mozilla.com
push dateFri, 27 May 2016 23:00:07 +0000
reviewersgps
bugs1274611
milestone49.0a1
Bug 1274611: handle empty error messages properly; r?gps MozReview-Commit-ID: 4Adn7X0HOu1
config/mozunit.py
--- a/config/mozunit.py
+++ b/config/mozunit.py
@@ -68,17 +68,17 @@ class _MozTestResult(_TestResult):
     def addFailure(self, test, err):
         _TestResult.addFailure(self, test, err)
         self.printFail(test,err)
         self.stream.writeln("FAIL: {0}".format(self.getDescription(test)))
         self.stream.writeln(self.failures[-1][1])
 
     def printFail(self, test, err):
         exctype, value, tb = err
-        message = value.message.splitlines()[0]
+        message = value.message.splitlines()[0] if value.message else 'NO MESSAGE'
         # Skip test runner traceback levels
         while tb and self._is_relevant_tb_level(tb):
             tb = tb.tb_next
         if tb:
             _, ln, _ = inspect.getframeinfo(tb)[:3]
             message = 'line {0}: {1}'.format(ln, message)
         self.printStatus("TEST-UNEXPECTED-FAIL", test, message)