summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2016-04-13 09:33:42 -0700
committerTim Smith <tsmith84@gmail.com>2016-04-13 09:33:42 -0700
commit9c8ee08b5d89ff2df113c59e72dd14332b99ac30 (patch)
treefa0bde45216620b85c3d85f0d0362cc698d94490
parentae9256a934155bd6ee69f7eea9fce80372e457ac (diff)
downloadohai-9c8ee08b5d89ff2df113c59e72dd14332b99ac30.tar.gz
Remove the redundant begin
-rw-r--r--lib/ohai/hints.rb16
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)