sensu/sensu — pull request #574 by dcondomitti (2013-07-10 20:53:47+00:00)
Title: Server exits when check with a nil status is received

If a check is received with a nil status then sensu-server throws a TypeError exception and exits.

```
{"timestamp":"2013-07-10T15:22:07.081615-0400","level":"info","message":"{:handlers=>[\"default\"], :notification=>\"Could not write to /var/app\", :command=>\"/etc/sensu/plugins/check-fs-writable.rb -d /var/app\", :subscribers=>[\"base\"], :interval=>60, :occurrences=>1, :standalone=>true, :refresh=>86400, :environment=>\"testing\", :type=>\"check\", :name=>\"var_app_writable\", :issued=>1373456246, :executed=>1373456186, :output=>\"\", :status=>nil, :duration=>60.087, :history=>[\"\", \"\", \"\", \"\"]}"}
```

```
/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.10.0/lib/sensu/server.rb:202:in `[]': no implicit conversion from nil to integer (TypeError)
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.10.0/lib/sensu/server.rb:202:in `event_handlers'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.10.0/lib/sensu/server.rb:318:in `handle_event'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.10.0/lib/sensu/server.rb:486:in `block (5 levels) in process_result'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/em-redis-unified-0.4.1/lib/em-redis/redis_protocol.rb:458:in `call'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/em-redis-unified-0.4.1/lib/em-redis/redis_protocol.rb:458:in `dispatch_response'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/em-redis-unified-0.4.1/lib/em-redis/redis_protocol.rb:421:in `process_cmd'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/em-redis-unified-0.4.1/lib/em-redis/redis_protocol.rb:386:in `receive_data'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.10.0/lib/sensu/server.rb:14:in `run'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.10.0/bin/sensu-server:10:in `'
from /opt/sensu/bin/sensu-server:23:in `load'
from /opt/sensu/bin/sensu-server:23:in `

'
```