From fb50ba1e55240d467008a169ecaf3333637b010e Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 8 Jul 2021 12:39:45 -0400 Subject: [PATCH] Agent: Remove unnecessary `if` from _find_files() --- monkey/infection_monkey/ransomware/ransomware_payload.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/monkey/infection_monkey/ransomware/ransomware_payload.py b/monkey/infection_monkey/ransomware/ransomware_payload.py index 6daa45b87..8993ecab4 100644 --- a/monkey/infection_monkey/ransomware/ransomware_payload.py +++ b/monkey/infection_monkey/ransomware/ransomware_payload.py @@ -65,9 +65,6 @@ class RansomwarePayload: def _find_files(self) -> List[Path]: LOG.info(f"Collecting files in {self._target_dir}") - if not self._target_dir: - return [] - return select_production_safe_target_files(self._target_dir, self._targeted_file_extensions) def _encrypt_files(self, file_list: List[Path]) -> List[Tuple[Path, Optional[Exception]]]: