Skip to content

Commit

Permalink
remove a keystore from name
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain committed Sep 15, 2019
1 parent 6b68c82 commit fb4f218
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions leeloo/lib/leeloo/preferences.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ def add_keystore keystore
end
end

def remove_keystore keystore
if @keystores.include? keystore
def remove_keystore name
keystore = @keystores.find { |k| k["name"] == name }
if keystore !=nil
@keystores.delete keystore
end
end
Expand Down Expand Up @@ -88,8 +89,8 @@ def add_keystore keystore
File.write("#{@path}/keystores", @keystores.to_yaml)
end

def remove_keystore keystore
super keystore
def remove_keystore name
super name
File.write("#{@path}/keystores", @keystores.to_yaml)
end

Expand Down

0 comments on commit fb4f218

Please sign in to comment.