Permalink
Browse files

Merge pull request #329 from portertech/config-checks

[config-checks] don't fail to start if there is no checks key
  • Loading branch information...
2 parents 8c3d44a + 01a9f72 commit 73088f69ea7731f09bf95debe5486b8b8b8d805b @portertech portertech committed Jul 5, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/sensu/settings.rb
@@ -5,6 +5,7 @@ class Settings
def initialize
@logger = Cabin::Channel.get
@settings = Hash.new
+ @settings[:checks] = Hash.new
@indifferent_access = false
@loaded_env = false
@loaded_files = Array.new
@@ -182,7 +183,7 @@ def invalid(reason, details={})
def validate_checks
unless @settings[:checks].is_a?(Hash)
- invalid('missing checks configuration')
+ invalid('checks must be a hash')
end
checks.each do |check|
unless check[:interval].is_a?(Integer) && check[:interval] > 0

0 comments on commit 73088f6

Please sign in to comment.