Skip to content

Commit

Permalink
add helpful message for incorrect rrddir setting
Browse files Browse the repository at this point in the history
  • Loading branch information
jf committed Sep 30, 2009
1 parent b1c6322 commit d916c5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/collectd-json.rb
Expand Up @@ -98,7 +98,8 @@ class << self

def hosts
if @rrddir
Dir.glob("#{@rrddir}/*").map {|e| e.split('/').last }.sort
d = Dir.glob("#{@rrddir}/*").map {|e| e.split('/').last }.sort
d.empty? ? ['No hosts found. Please check <strong>rrddir</strong> in config/init.rb!'] : d
else
['You need to specify <strong>rrddir</strong> in config/init.rb!']
end
Expand Down

0 comments on commit d916c5b

Please sign in to comment.