Skip to content

Commit

Permalink
Merge pull request #84 from schisamo/fix-malformed-version-string
Browse files Browse the repository at this point in the history
Additionally catch ArgumentError; Fixes #79
  • Loading branch information
miketheman committed Mar 19, 2014
2 parents b2ea22e + 7ae58d0 commit c95037a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
default['datadog']['install_base'] = Gem::Version.new(node['languages']['python']['version'].gsub(/(\d\.\d\.\d).+/, "\\1")) < Gem::Version.new('2.6.0')
rescue NoMethodError # nodes['languages']['python'] == nil
Chef::Log.warn 'no version of python found'
rescue ArgumentError
Chef::Log.warn "could not parse python version string: #{node['languages']['python']['version']}"
end

# Chef handler version
Expand Down

0 comments on commit c95037a

Please sign in to comment.