import csv

from Imports.Equipments.EquipmentLine import EquipmentLine
from Imports.Equipments.EquipmentLineParser import parseRow
from Imports.Equipments.EquipmentCreator import insertEquipment

def importEquipments(filename):
	importedEquipments = []

	with open(filename, 'rt') as csvfile:
		equipmentsReader = csv.reader(csvfile, delimiter=',', quotechar='"')
		for row in equipmentsReader:
			try:
				equipmentLine = parseRow(row)
				if equipmentLine.id_equip not in importedEquipments:
					insertEquipment(equipmentLine)
					importedEquipments.append(equipmentLine.id_equip)
					# print(equipmentLine)
			except ValueError:
				print("Problem with row {} : {}".format(equipmentsReader.line_num, ','.join(row)))

	csvfile.close()

75008cc91ee9a99b898d0a99e822e465d81a4916
<mask token>

<mask token>


def importEquipments(filename):
    importedEquipments = []
    with open(filename, 'rt') as csvfile:
        equipmentsReader = csv.reader(csvfile, delimiter=',', quotechar='"')
        for row in equipmentsReader:
            try:
                equipmentLine = parseRow(row)
                if equipmentLine.id_equip not in importedEquipments:
                    insertEquipment(equipmentLine)
                    importedEquipments.append(equipmentLine.id_equip)
            except ValueError:
                print('Problem with row {} : {}'.format(equipmentsReader.
                    line_num, ','.join(row)))
    csvfile.close()

import csv
from Imports.Equipments.EquipmentLine import EquipmentLine
from Imports.Equipments.EquipmentLineParser import parseRow
from Imports.Equipments.EquipmentCreator import insertEquipment


def importEquipments(filename):
    importedEquipments = []
    with open(filename, 'rt') as csvfile:
        equipmentsReader = csv.reader(csvfile, delimiter=',', quotechar='"')
        for row in equipmentsReader:
            try:
                equipmentLine = parseRow(row)
                if equipmentLine.id_equip not in importedEquipments:
                    insertEquipment(equipmentLine)
                    importedEquipments.append(equipmentLine.id_equip)
            except ValueError:
                print('Problem with row {} : {}'.format(equipmentsReader.
                    line_num, ','.join(row)))
    csvfile.close()

import csv

from Imports.Equipments.EquipmentLine import EquipmentLine
from Imports.Equipments.EquipmentLineParser import parseRow
from Imports.Equipments.EquipmentCreator import insertEquipment

def importEquipments(filename):
	importedEquipments = []

	with open(filename, 'rt') as csvfile:
		equipmentsReader = csv.reader(csvfile, delimiter=',', quotechar='"')
		for row in equipmentsReader:
			try:
				equipmentLine = parseRow(row)
				if equipmentLine.id_equip not in importedEquipments:
					insertEquipment(equipmentLine)
					importedEquipments.append(equipmentLine.id_equip)
					# print(equipmentLine)
			except ValueError:
				print("Problem with row {} : {}".format(equipmentsReader.line_num, ','.join(row)))

	csvfile.close()
