Bug 740242 - runtests.py | Received unexpected exception while running application 'NoneType' object has no attribute 'group'; r=ted
authorTim Taubert <tim.taubert@gmx.de>
Fri, 04 May 2012 16:21:24 +0200
changeset 97669 b6e6a24c9e9568af11b821211a6836edc313c385
parent 97634 db1f131884deee171945b025d1149c80495d8e69
child 97670 a8ea30b2a72973a57947de004d0257babd1a76fb
push id173
push userlsblakk@mozilla.com
push dateFri, 24 Aug 2012 15:39:16 +0000
treeherdermozilla-release@bcc45eb1fb41 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs740242
milestone15.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 740242 - runtests.py | Received unexpected exception while running application 'NoneType' object has no attribute 'group'; r=ted
build/automationutils.py
--- a/build/automationutils.py
+++ b/build/automationutils.py
@@ -502,40 +502,51 @@ class ShutdownLeakLogger(object):
 
       if test["leakedDocShells"]:
         self.logger.info("  %d docShell(s)", len(test["leakedDocShells"]))
 
   def _logWindow(self, line):
     created = line[:2] == "++"
     id = self._parseValue(line, "serial")
 
+    # log line has invalid format
+    if not id:
+      return
+
     if self.currentTest:
       windows = self.currentTest["windows"]
       if created:
         windows.add(id)
       else:
         windows.discard(id)
     elif self.seenShutdown and not created:
       self.leakedWindows[id] = self._parseValue(line, "url")
 
   def _logDocShell(self, line):
     created = line[:2] == "++"
     id = self._parseValue(line, "id")
 
+    # log line has invalid format
+    if not id:
+      return
+
     if self.currentTest:
       docShells = self.currentTest["docShells"]
       if created:
         docShells.add(id)
       else:
         docShells.discard(id)
     elif self.seenShutdown and not created:
       self.leakedDocShells.add(id)
 
   def _parseValue(self, line, name):
-    return re.search("\[%s = (.+?)\]" % name, line).group(1)
+    match = re.search("\[%s = (.+?)\]" % name, line)
+    if match:
+      return match.group(1)
+    return None
 
   def _parseLeakingTests(self):
     leakingTests = []
 
     for test in self.tests:
       test["leakedWindows"] = [self.leakedWindows[id] for id in test["windows"] if id in self.leakedWindows]
       test["leakedDocShells"] = [id for id in test["docShells"] if id in self.leakedDocShells]
       test["leakCount"] = len(test["leakedWindows"]) + len(test["leakedDocShells"])