summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2014-07-11 18:46:37 +0300
committerSaku Ytti <saku@ytti.fi>2014-07-11 18:46:37 +0300
commitee1bcd1f4d8d9b487d9c37b8ad97c06f24bdb09a (patch)
treed2603cdabdc7d4e2ea34cc74471d747dec50d2a5
parent20c3eac8aeb460c0ed8ecee6a73c2171e60f82eb (diff)
ignore empty lines in CSV source
Closes #23
-rw-r--r--lib/oxidized/source/csv.rb1
1 files changed, 1 insertions, 0 deletions
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|