diff options
author | Tim Smith <tsmith84@gmail.com> | 2016-04-13 09:33:42 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2016-04-13 09:33:42 -0700 |
commit | 9c8ee08b5d89ff2df113c59e72dd14332b99ac30 (patch) | |
tree | fa0bde45216620b85c3d85f0d0362cc698d94490 | |
parent | ae9256a934155bd6ee69f7eea9fce80372e457ac (diff) | |
download | ohai-9c8ee08b5d89ff2df113c59e72dd14332b99ac30.tar.gz |
Remove the redundant begin
-rw-r--r-- | lib/ohai/hints.rb | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/ohai/hints.rb b/lib/ohai/hints.rb index 10f1719d..d33cfcce 100644 --- a/lib/ohai/hints.rb +++ b/lib/ohai/hints.rb @@ -26,15 +26,13 @@ module Ohai end def self.parse_hint_file(filename) - begin - json_parser = FFI_Yajl::Parser.new - hash = json_parser.parse(File.read(filename)) - hash || {} # hint - # should exist because the file did, even if it didn't - # contain anything - rescue FFI_Yajl::ParseError => e - Ohai::Log.error("Could not parse hint file at #{filename}: #{e.message}") - end + json_parser = FFI_Yajl::Parser.new + hash = json_parser.parse(File.read(filename)) + hash || {} # hint + # should exist because the file did, even if it didn't + # contain anything + rescue FFI_Yajl::ParseError => e + Ohai::Log.error("Could not parse hint file at #{filename}: #{e.message}") end def self.hint?(name) |