def create_routes(self, data, **kwargs):
        for row in data:
            try:
                id = int(row['route_id'])
            except ValueError:
                print 'WARNING: Could not process route id of %s' % row
                continue

            try:
                type = int(row['route_type'])
            except ValueError:
                type = 0

            try:
                Route(id=id,
                      name=self.allcaps(row['route_short_name']),
                      description=self.allcaps(row['route_long_name']),
                      type=type,
                      color=row['route_color']).save()
            except:
                print 'Route exists'
                continue
dataset/ETHPy150Open shaunduncan/breezeminder/breezeminder/management/commands/import_marta_data.py/ImportMartaData.create_routes/original