Fix lint errors introduced by begin/rescue block in read_configuration

This commit is contained in:
Timothée Floure 2018-12-23 14:23:54 +01:00
parent b62ff3b37a
commit 9b3271ac40
2 changed files with 4 additions and 2 deletions

View file

@ -2,3 +2,5 @@ Metrics/MethodLength:
Max: 25 Max: 25
Metrics/AbcSize: Metrics/AbcSize:
Enabled: false Enabled: false
Style/RedundantBegin:
Enabled: false

View file

@ -9,8 +9,8 @@ require 'net/ldap'
def read_configuration(path) def read_configuration(path)
begin begin
TOML.load_file(path) TOML.load_file(path)
rescue Errno::ENOENT => raisedError rescue Errno::ENOENT => raised_error
puts "Could not open configuration file: #{raisedError}" puts "Could not open configuration file: #{raised_error}"
exit(1) exit(1)
end end
end end