island: Modify log message when creating secure directory on Windows

This commit is contained in:
Shreya 2021-06-14 12:22:45 +05:30
parent eede06de17
commit 5d7d86aedc
1 changed files with 2 additions and 7 deletions

View File

@ -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