1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2025-02-20 01:50:04 +00:00

minor fix

This commit is contained in:
Adrien Waksberg 2016-10-20 21:25:58 +02:00
parent 7b301519b6
commit e4c03619b3

View file

@ -88,9 +88,9 @@ class Config
# expire -> the time of expire to GPG key
# @rtrn: true if the GPG key is create, else false
def setup_gpg_key(password, name, length = 4096, expire = 0)
if name.nil? or name.empty?
if name.to_s.empty?
raise "#{I18n.t('error.config.genkey_gpg.name')}"
elsif password.nil? or password.empty?
elsif password.to_s.empty?
raise "#{I18n.t('error.config.genkey_gpg.password')}"
end