mirror of
https://github.com/nishiki/manage-password.git
synced 2024-11-23 13:57:52 +00:00
fix check error message
This commit is contained in:
parent
77412b4794
commit
2199e8cf8a
1 changed files with 3 additions and 2 deletions
|
@ -63,7 +63,7 @@ class Sync
|
|||
@socket.puts send_msg.to_json
|
||||
msg = JSON.parse(@socket.gets)
|
||||
|
||||
if !msg['error']
|
||||
if !defined?(msg['error'])
|
||||
@error_msg = I18n.t('error.sync.communication')
|
||||
return nil
|
||||
elsif msg['error'].nil?
|
||||
|
@ -74,6 +74,7 @@ class Sync
|
|||
|
||||
@mpw = MPW.new(tmp_file)
|
||||
if !@mpw.decrypt(gpg_password)
|
||||
puts @mpw.error_msg
|
||||
return nil
|
||||
end
|
||||
|
||||
|
@ -103,7 +104,7 @@ class Sync
|
|||
@socket.puts send_msg.to_json
|
||||
msg = JSON.parse(@socket.gets)
|
||||
|
||||
if !msg['error']
|
||||
if !defined?(msg['error'])
|
||||
@error_msg = I18n.t('error.sync.communication')
|
||||
return false
|
||||
elsif msg['error'].nil?
|
||||
|
|
Loading…
Reference in a new issue