Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
BUG: fix skip intial lines
Browse files Browse the repository at this point in the history
fixes #31
  • Loading branch information
Sebastian Wagner committed Sep 18, 2017
1 parent 147d492 commit 9ae5fb8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions intelmq_webinput_csv/bin/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,12 @@ def upload_file():
if parameters['skipInitialLines']:
if parameters['has_header'] and lineindex == 1:
for _ in range(parameters['skipInitialLines']):
next(reader)
line = next(reader)
lineindex += 1
elif not parameters['has_header'] and lineindex == 0:
for _ in range(parameters['skipInitialLines']):
next(reader)
line = next(reader)
lineindex += 1
if lineindex >= parameters['loadLinesMax']:
break
if valid_ip_addresses is None:
Expand Down

0 comments on commit 9ae5fb8

Please sign in to comment.