Island: Remove TypeError exception from ScanEventHandler

This commit is contained in:
Ilija Lazoroski 2022-09-30 16:23:04 +02:00
parent f23093dc78
commit d42a353aaa
1 changed files with 1 additions and 2 deletions

View File

@ -45,7 +45,7 @@ class ScanEventHandler:
self._update_target_machine_os(target_machine, event) self._update_target_machine_os(target_machine, event)
self._update_nodes(target_machine, event) self._update_nodes(target_machine, event)
except (RetrievalError, StorageError, TypeError, UnknownRecordError): except (RetrievalError, StorageError, UnknownRecordError):
logger.exception("Unable to process ping scan data") logger.exception("Unable to process ping scan data")
def handle_tcp_scan_event(self, event: TCPScanEvent): def handle_tcp_scan_event(self, event: TCPScanEvent):
@ -64,7 +64,6 @@ class ScanEventHandler:
def _get_target_machine(self, event: ScanEvent) -> Machine: def _get_target_machine(self, event: ScanEvent) -> Machine:
try: try:
target_machines = self._machine_repository.get_machines_by_ip(event.target) target_machines = self._machine_repository.get_machines_by_ip(event.target)
print(target_machines)
return target_machines[0] return target_machines[0]
except UnknownRecordError: except UnknownRecordError:
machine = Machine( machine = Machine(