1
0
Fork 0
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:
adrien 2014-01-16 23:33:40 +01:00
parent 77412b4794
commit 2199e8cf8a

View file

@ -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?