def prepareGrid(self, page): exportGrid = ExportGrid() try: with UnstartedRaceWrapper(): if self.pageInfo[page][0] == 'Primes': exportGrid = ExportGrid(**Primes.GetGrid()) else: exportGrid.setResultsOneList(self.pageInfo[page][0], True, showLapTimes=False) except KeyError: return ExportGrid() exportGrid.title = u'\n'.join( [_('Podium Results'), u'', exportGrid.title]) return exportGrid
def prepareGrid(self, page): showLapTimes = (not Model.race) or getattr( Model.race, 'includeLapTimesInPrintout', True) try: with UnstartedRaceWrapper(): if self.pageInfo[page][0] == 'Primes': exportGrid = ExportGrid(**Primes.GetGrid()) else: exportGrid = ExportGrid() exportGrid.setResultsOneList(self.pageInfo[page][0], True, showLapTimes=showLapTimes) except KeyError: return ExportGrid() return exportGrid