From 4f8ccc872ffd96a37bf644df156a2ded3970d251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Rodrigo?= Date: Tue, 17 Sep 2019 22:00:54 +0200 Subject: [PATCH] Fix CSV multi-lines header in merge #615 (#616) --- analysers/Analyser_Merge.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/analysers/Analyser_Merge.py b/analysers/Analyser_Merge.py index ea4ef726f..f78ca4a02 100644 --- a/analysers/Analyser_Merge.py +++ b/analysers/Analyser_Merge.py @@ -410,8 +410,7 @@ def __init__(self, source, separator = u',', null = u'', header = True, quote = def header(self): self.f = self.source.open() if self.have_header: - line = self.f.readline().strip().strip(self.separator) - return csv.reader([line], delimiter=self.separator, quotechar=self.quote).next() + return csv.reader(self.f, delimiter=self.separator, quotechar=self.quote).next() def import_(self, table, srid, osmosis): self.f = self.f or self.source.open()