diff options
author | Harel Ben-Attia <harelba@gmail.com> | 2013-08-08 10:48:13 -0400 |
---|---|---|
committer | Harel Ben-Attia <harelba@gmail.com> | 2013-08-08 10:48:13 -0400 |
commit | fbef1ce50c6079f845a2efbcc6c7734ffc7855af (patch) | |
tree | 53612d316bbda4cc50d749eefeebe51c0113569c | |
parent | a41032127c5d26db5f1c24846ffc531882602694 (diff) |
Fix header skip processing so structure won't be analyzed until we skipped the header lines (thanks to fuckinghuarong for the bug)1.0
-rwxr-xr-x | q | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -393,9 +393,6 @@ class TableCreator(object): self._insert_row_i(line) def _insert_row_i(self,line): - self.lines_read += 1 - if self.lines_read <= self.header_skip: - return col_vals = line_splitter.split(line) # If we have more columns than we inferred @@ -425,6 +422,10 @@ class TableCreator(object): if self.table_created: raise Exception('Table is already created') + self.lines_read += 1 + if self.lines_read <= self.header_skip: + return + # Add that line to the column inferer result = self.column_inferer.analyze(line) # If inferer succeeded, |