from DumpCSV import DumpCSV class Errors(DumpCSV): def filename(self): return self.application().setting('ErrorLogFilename') def cellContents(self, rowIndex, colIndex, value): """Hook for subclasses to customize the contents of a cell. Based on any criteria (including location). """ if self._headings[colIndex] in ('pathname', 'error report filename'): path = self.application().serverSidePath() if value.startswith(path): value = value[len(path):] if value.startswith('/'): value = value[1:] link = self.request().uriWebKitRoot() + value value = value.replace('/', '/') value = '%s' % (link, value) else: value = value.replace('/', '/') return value elif self._headings[colIndex] == 'time': return '%s' % (value) else: return value