From 5d7d86aedcd47da98722c375ce5d54bdedc41f12 Mon Sep 17 00:00:00 2001 From: Shreya Date: Mon, 14 Jun 2021 12:22:45 +0530 Subject: [PATCH] island: Modify log message when creating secure directory on Windows --- monkey/monkey_island/cc/environment/utils.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/monkey/monkey_island/cc/environment/utils.py b/monkey/monkey_island/cc/environment/utils.py index 8efbb4492..524b9d5a8 100644 --- a/monkey/monkey_island/cc/environment/utils.py +++ b/monkey/monkey_island/cc/environment/utils.py @@ -30,10 +30,7 @@ def _create_secure_directory_linux(path: str): # because it will temporarily create an accessible directory which anyone can use. os.mkdir(path, mode=0o700) except Exception as ex: - LOG.error( - f'Could not create a directory at "{path}" (maybe environmental variables could not be ' - f"resolved?): {str(ex)}" - ) + LOG.error(f'Could not create a directory at "{path}": {str(ex)}') raise ex @@ -45,7 +42,5 @@ def _create_secure_directory_windows(path: str): ) win32file.CreateDirectory(path, security_attributes) except Exception as ex: - LOG.error( - f'Could not create a directory at "{path}": {str(ex)}' - ) + LOG.error(f'Could not create a directory at "{path}": {str(ex)}') raise ex