Agent: Improve log messages in RansomwarePayload.cleanup()

This commit is contained in:
Mike Salvatore 2021-11-30 11:34:45 -05:00
parent 62a6b09e00
commit 789a6691c1
1 changed files with 5 additions and 5 deletions

View File

@ -76,14 +76,14 @@ class RansomwarePayload:
def cleanup(self): def cleanup(self):
if self._readme_incomplete: if self._readme_incomplete:
logger.info( logger.info(
"README.txt file dropping was interrupted. Removing corrupt file and " "The process of leaving a README.txt was interrupted. Removing the corrupt file "
"trying again." "and trying again."
) )
try: try:
self._readme_file_path.unlink() self._readme_file_path.unlink()
self._leave_readme_in_target_directory() self._leave_readme_in_target_directory()
except Exception as ex: except Exception as ex:
logger.info( logger.error(
f"An exception occurred: {str(ex)}. README.txt file dropping was " "An error occurred while trying to remove the corrupt or incomplete README.txt "
"unsuccessful." f"file: {ex}"
) )