mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Only remove the pending key if it exists
This commit is contained in:
parent
d3edc88bae
commit
5f866ad9f1
@ -98,9 +98,10 @@ def accept_key(pki_dir, pub, id_):
|
||||
pki_dir,
|
||||
'minions_pre/{0}'.format(id_)
|
||||
)
|
||||
with open(oldkey) as fp_:
|
||||
if fp_.read() == pub:
|
||||
os.remove(oldkey)
|
||||
if os.path.isfile(oldkey):
|
||||
with open(oldkey) as fp_:
|
||||
if fp_.read() == pub:
|
||||
os.remove(oldkey)
|
||||
|
||||
|
||||
def remove_key(pki_dir, id_):
|
||||
|
Loading…
Reference in New Issue
Block a user