def processLine(self, line): match = re.search('Call to undefined function ([a-z0-9_]+)', line) if match: name = match.group(1) functions = self.php_source().functions if name in functions: functions.remove(name) self.error("Remove undefined function: %s (new function list length: %s)" % ( name, len(functions))) else: WatchStdout.processLine(self, line)