lib/papertrail/cli_helpers.rb in papertrail-0.9.16 vs lib/papertrail/cli_helpers.rb in papertrail-0.9.17

- old
+ new

@@ -1,16 +1,14 @@ module Papertrail module CliHelpers def find_configfile - begin - if File.exists?(path = File.expand_path('.papertrail.yml')) - return path - end - if File.exists?(path = File.expand_path('~/.papertrail.yml')) - return path - end - rescue ArgumentError => e + if File.exists?(path = File.expand_path('.papertrail.yml')) + return path end + if File.exists?(path = File.expand_path('~/.papertrail.yml')) + return path + end + rescue ArgumentError end def load_configfile(file_path) symbolize_keys(YAML.load_file(file_path)) end