summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarel Ben-Attia <harelba@gmail.com>2013-08-08 10:48:13 -0400
committerHarel Ben-Attia <harelba@gmail.com>2013-08-08 10:48:13 -0400
commitfbef1ce50c6079f845a2efbcc6c7734ffc7855af (patch)
tree53612d316bbda4cc50d749eefeebe51c0113569c
parenta41032127c5d26db5f1c24846ffc531882602694 (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-xq7
1 files changed, 4 insertions, 3 deletions
diff --git a/q b/q
index 551a280..f506ced 100755
--- a/q
+++ b/q
@@ -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,