dataimport.py
branchstable
changeset 9695 aa982b7c3f2a
parent 9694 c90107199dea
child 9696 4de6e73f580d
--- a/dataimport.py	Thu Apr 03 15:30:37 2014 +0200
+++ b/dataimport.py	Thu Apr 03 15:36:33 2014 +0200
@@ -143,11 +143,11 @@
             if not skip_empty or any(decoded):
                 yield decoded
     else:
-        # Skip first line
-        try:
-            row = it.next()
-        except csv.Error:
-            pass
+        if skipfirst:
+            try:
+                row = it.next()
+            except csv.Error:
+                pass
         # Safe version, that can cope with error in CSV file
         while True:
             try: