def extractStatistic(self, line): if self.regular_exp.match(line): gapasword = misc.getWordAtIndex(line, self.lineindex) # if the gap is infinite, no data is passed to the test run if gapasword != "infinite": gap = self.turnIntoFloat(gapasword) self.addData(self.datakey, gap)
def extractStatistic(self, line): """ overwrite this method for own reader subclasses """ try: if self.regular_exp.search(line): data = None try: data = self.datatype( misc.getWordAtIndex(line, self.lineindex)) except ValueError: data = None except IndexError: data = None except TypeError: # print self.name, " failed data conversion" raise TypeError( "Type error during data conversion in line <%s>" % line) self.addData(self.datakey, data) except AttributeError: # print self.name, " has no such attribute" pass