forked from p34709852/monkey
Minor exception handling improvement
This commit is contained in:
parent
24ac497eec
commit
89bdbf946f
|
@ -3,6 +3,7 @@ from abc import abstractmethod
|
|||
from datetime import datetime
|
||||
|
||||
import infection_monkey.exploit
|
||||
from common.utils.exceptions import FailedExploitationError
|
||||
from common.utils.exploit_enum import ExploitType
|
||||
from infection_monkey.config import WormConfiguration
|
||||
from infection_monkey.utils.plugins.plugin import Plugin
|
||||
|
@ -73,6 +74,8 @@ class HostExploiter(Plugin):
|
|||
result = None
|
||||
try:
|
||||
result = self._exploit_host()
|
||||
except FailedExploitationError as e:
|
||||
logger.debug(e)
|
||||
except Exception as _:
|
||||
logger.error(f'Exception in exploit_host', exc_info=True)
|
||||
finally:
|
||||
|
|
Loading…
Reference in New Issue