Agent: Fix mypy issues in ransomware and encryption

This commit is contained in:
vakarisz 2022-09-23 09:42:25 +03:00
parent 3d7e9be150
commit 0d08ce467e
2 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ class Ransomware:
self._send_telemetry(filepath, False, str(ex))
def _send_telemetry(self, filepath: Path, success: bool, error: str):
encryption_attempt = FileEncryptionTelem(str(filepath), success, error)
encryption_attempt = FileEncryptionTelem(filepath, success, error)
self._telemetry_messenger.send_telemetry(encryption_attempt)
@interruptible_function(msg="Received a stop signal, skipping leave readme")

View File

@ -16,7 +16,7 @@ class FileEncryptionTelem(BatchableTelemMixin, IBatchableTelem, BaseTelem):
"""
super().__init__()
self._telemetry_entries.append({"path": filepath, "success": success, "error": error})
self._telemetry_entries.append({"path": str(filepath), "success": success, "error": error})
telem_category = TelemCategoryEnum.FILE_ENCRYPTION