[qooxdoo-commit] SF.net SVN: qooxdoo:[21840] trunk/qooxdoo/tool/admin/bin/ simulationLogParser.py
Brought to you by:
ecker,
martinwittemann
From: <d_w...@us...> - 2010-03-31 07:46:36
|
Revision: 21840 http://qooxdoo.svn.sourceforge.net/qooxdoo/?rev=21840&view=rev Author: d_wagner Date: 2010-03-31 07:46:28 +0000 (Wed, 31 Mar 2010) Log Message: ----------- [BUG #3154] Fixed ignore list handling Modified Paths: -------------- trunk/qooxdoo/tool/admin/bin/simulationLogParser.py Modified: trunk/qooxdoo/tool/admin/bin/simulationLogParser.py =================================================================== --- trunk/qooxdoo/tool/admin/bin/simulationLogParser.py 2010-03-31 07:44:57 UTC (rev 21839) +++ trunk/qooxdoo/tool/admin/bin/simulationLogParser.py 2010-03-31 07:46:28 UTC (rev 21840) @@ -31,7 +31,7 @@ # @param ignore {list} List of strings that will be evaluated as regular # expressions. Any line matching one of these will not be logged. class SimulationLogParser: - def __init__(self, logFile, ignoreStrings=[]): + def __init__(self, logFile, ignoreStrings=None): if not logFile: raise Exception("No log file specified!") @@ -40,10 +40,11 @@ self.log = open(logFile, "r") - self.ignore = [] - for string in ignoreStrings: - reg = re.compile(string) - self.ignore.append(reg) + self.ignore = None + if ignoreStrings: + for string in ignoreStrings: + reg = re.compile(string) + self.ignore.append(reg) self.simulationsList = None @@ -161,11 +162,12 @@ logentryList = [] for entry in logEntries: ignore = False - for reg in self.ignore: - found = reg.search(entry) - if found: - ignore = True - continue + if self.ignore: + for reg in self.ignore: + found = reg.search(entry) + if found: + ignore = True + continue if ignore: continue This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |