Improved exception handling of expected exceptions - if they are expected, we don't need to see the error trace.

This commit is contained in:
VakarisZ 2021-02-25 16:26:43 +02:00
parent e9b84ff86d
commit ce697b3a45
1 changed files with 2 additions and 2 deletions

View File

@ -79,8 +79,8 @@ class HostExploiter(Plugin):
result = None
try:
result = self._exploit_host()
except FailedExploitationError:
logger.debug('Exploiter failed.', exc_info=True)
except FailedExploitationError as e:
logger.debug(f'Exploiter failed: {e}.')
except Exception:
logger.error('Exception in exploit_host', exc_info=True)
finally: