Skip to content

Commit

Permalink
[#75] Do not use rescue for data['devices'] in attributes/data.rb
Browse files Browse the repository at this point in the history
Revert "[#75] Need to rescue the data attribute as it will be nil if your not using that recipe (like in dev)"

This should not be needed:

    data = raise('BAM') rescue {}

    setting = data['devices'] || {}

    p setting

This reverts commit 45eb5ec.
  • Loading branch information
karmi committed Mar 6, 2013
1 parent 45eb5ec commit 9e0e770
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion attributes/data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@
#
data = Chef::DataBagItem.load('elasticsearch', 'data')[node.chef_environment] rescue {}

default.elasticsearch[:data][:devices] = data['devices'] rescue {}
default.elasticsearch[:data][:devices] = data['devices'] || {}

0 comments on commit 9e0e770

Please sign in to comment.