Bug 1068429 - Trivial fixes for formatting crashes in the tbplformatter.;r=jgraham
authorChris Manchester <cmanchester@mozilla.com>
Tue, 23 Sep 2014 20:33:31 -0400
changeset 207065 8b6aebc85b17fe9175c45e49e8f8c5f6fb679935
parent 207064 37935ebab1d199850cd01ce24732ba1f65c873e1
child 207066 1244ab6f3d0e52038aa63a6113488062e454bae7
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersjgraham
bugs1068429
milestone35.0a1
Bug 1068429 - Trivial fixes for formatting crashes in the tbplformatter.;r=jgraham
testing/mozbase/mozlog/mozlog/structured/formatters/tbplformatter.py
--- a/testing/mozbase/mozlog/mozlog/structured/formatters/tbplformatter.py
+++ b/testing/mozbase/mozlog/mozlog/structured/formatters/tbplformatter.py
@@ -26,20 +26,21 @@ class TbplFormatter(BaseFormatter):
             message += "\n%s" % data["stack"]
 
         return "%s\n" % message
 
     def process_output(self, data):
         return "PROCESS | %(process)s | %(data)s\n" % data
 
     def crash(self, data):
-        id = self.id_str(data["test"]) if "test" in data else "pid: " % data["process"]
+        id = self.id_str(data["test"]) if "test" in data else "pid: %s" % data["process"]
 
-        rv = ["PROCESS-CRASH | %s | application crashed [%s]" % (id,
-                                                                 data["signature"])]
+        signature = data["signature"] if data["signature"] else "unknown top frame"
+        rv = ["PROCESS-CRASH | %s | application crashed [%s]" % (id, signature)]
+
         if data.get("minidump_path"):
             rv.append("Crash dump filename: %s" % data["minidump_path"])
 
         if data.get("stackwalk_stderr"):
             rv.append("stderr from minidump_stackwalk:")
             rv.append(data["stackwalk_stderr"])
         elif data.get("stackwalk_stdout"):
             rv.append(data["stackwalk_stdout"])