added the missing declaration of eload and status

This commit is contained in:
Akhter 2015-07-28 10:37:15 -04:00
parent d70d1b0ed1
commit d3be3d54fb

View File

@ -837,12 +837,16 @@ class Key(object):
Delete all denied keys
'''
keys = self.list_keys()
for key in keys[self.DEN]:
try:
os.remove(os.path.join(self.opts['pki_dir'], status, key))
self.event.fire_event(eload, tagify(prefix='key'))
except (OSError, IOError):
pass
for status, keys in six.iteritems(self.list_keys()):
for key in keys[self.DEN]:
try:
os.remove(os.path.join(self.opts['pki_dir'], status, key))
eload = {'result': True,
'act': 'delete',
'id': key}
self.event.fire_event(eload, tagify(prefix='key'))
except (OSError, IOError):
pass
self.check_minion_cache()
return self.list_keys()