perceval/backends/mozilla/mozillaclub.py
def __get_event_fields(self):
        """Get the events fields (columns) from the cells received."""

        event_fields = {}
        # The cells in the first row are the column names
        # Check that the columns names are the same we have as template
        # Create the event template from the data retrieved
        while self.ncell < len(self.cells):
            cell = self.cells[self.ncell]
            row = cell['gs$cell']['row']
            if int(row) > 1:
                # When the row number >1 the column row is finished
                break
            ncol = int(cell['gs$cell']['col'])
            name = cell['content']['$t']
            event_fields[ncol] = name
            if ncol in EVENT_TEMPLATE:
                if event_fields[ncol] != EVENT_TEMPLATE[ncol]:
                    logger.warning("Event template changed in spreadsheet %s vs %s",
                                   name, EVENT_TEMPLATE[ncol])
            else:
                logger.warning("Event template changed in spreadsheet. New column: %s", name)

            self.ncell += 1
        return event_fields
def __get_event_fields(self):
        """Get the events fields (columns) from the cells received."""

        event_fields = {}
        # The cells in the first row are the column names
        # Check that the columns names are the same we have as template
        # Create the event template from the data retrieved
        while self.ncell < len(self.cells):
            cell = self.cells[self.ncell]
            row = cell['gs$cell']['row']
            if int(row) > 1:
                # When the row number >1 the column row is finished
                break
            ncol = int(cell['gs$cell']['col'])
            name = cell['content']['$t']
            event_fields[ncol] = name
            if ncol in EVENT_TEMPLATE:
                if event_fields[ncol] != EVENT_TEMPLATE[ncol]:
                    logger.warning("Event template changed in spreadsheet %s vs %s",
                                   name, EVENT_TEMPLATE[ncol])
            else:
                logger.warning("Event template changed in spreadsheet. New column: %s", name)

            self.ncell += 1
        return event_fields
Get the events fields (columns) from the cells received.