From 7c5d336aa0fbf8dc731eb1d88fb16c3d4b11a162 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Sat, 13 Dec 2014 03:09:36 +0200 Subject: Skip comments closes #64 --- 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 462d759..3b66e65 100644 --- a/lib/oxidized/source/csv.rb +++ b/lib/oxidized/source/csv.rb @@ -19,6 +19,7 @@ class CSV < Source def load nodes = [] open(@cfg.file).each_line do |line| + next if line.match /^\s*#/ data = line.chomp.split @cfg.delimiter next if data.empty? # map node parameters -- cgit v1.2.1