From ee1bcd1f4d8d9b487d9c37b8ad97c06f24bdb09a Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Fri, 11 Jul 2014 18:46:37 +0300 Subject: ignore empty lines in CSV source Closes #23 --- lib/oxidized/source/csv.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/oxidized/source') diff --git a/lib/oxidized/source/csv.rb b/lib/oxidized/source/csv.rb index 484a186..462d759 100644 --- a/lib/oxidized/source/csv.rb +++ b/lib/oxidized/source/csv.rb @@ -20,6 +20,7 @@ class CSV < Source nodes = [] open(@cfg.file).each_line do |line| data = line.chomp.split @cfg.delimiter + next if data.empty? # map node parameters keys = {} @cfg.map.each do |key, position| -- cgit v1.2.1