Converts file line into dictonary

def _line_to_dict(self, file, field_names):
        """ Converts file line into dictonary """
        for line in file:
            delimiter = settings.IPGEOBASE_FILE_FIELDS_DELIMITER
            yield self._extract_data_from_line(line, field_names, delimiter)