mirror of
https://github.com/nishiki/manage-password.git
synced 2024-11-23 13:57:52 +00:00
change rescue
This commit is contained in:
parent
96fe71e07d
commit
1ab3c7e0b0
1 changed files with 6 additions and 8 deletions
|
@ -35,14 +35,12 @@ module MPW
|
|||
@password = password
|
||||
@suffix = suffix
|
||||
|
||||
begin
|
||||
@socket = TCPSocket.new(host, port)
|
||||
@enable = true
|
||||
rescue Exception => e
|
||||
@error_msg = "#{I18n.t('error.sync.connection')}\n#{e}"
|
||||
@enable = false
|
||||
end
|
||||
|
||||
@socket = TCPSocket.new(host, port)
|
||||
@enable = true
|
||||
rescue Exception => e
|
||||
@error_msg = "#{I18n.t('error.sync.connection')}\n#{e}"
|
||||
@enable = false
|
||||
else
|
||||
return @enable
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue