If one PBA fails it shouldn't stop all the rest.

This commit is contained in:
Shay Nehmad 2019-09-05 20:56:17 +03:00
parent 731e3acb90
commit e9cd20a345
1 changed files with 5 additions and 2 deletions

View File

@ -25,8 +25,11 @@ class PostBreach(object):
Executes all post breach actions.
"""
for pba in self.pba_list:
LOG.debug("Executing PBA: '{}'".format(pba.name))
pba.run()
try:
LOG.debug("Executing PBA: '{}'".format(pba.name))
pba.run()
except Exception as e:
LOG.error("PBA {} failed. Error info: {}".format(pba.name, e))
LOG.info("All PBAs executed. Total {} executed.".format(len(self.pba_list)))
@staticmethod