Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 740242 - runtests.py | Received unexpected exception while runnin…
Browse files Browse the repository at this point in the history
…g application 'NoneType' object has no attribute 'group'; r=ted
  • Loading branch information
Tim Taubert committed May 4, 2012
1 parent b9fad4f commit bb6151e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion build/automationutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,10 @@ 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:
Expand All @@ -520,6 +524,10 @@ 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:
Expand All @@ -530,7 +538,10 @@ def _logDocShell(self, line):
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 = []
Expand Down

0 comments on commit bb6151e

Please sign in to comment.