From 8dd4bb5e17e1c796470fe1c8f32044cbd6b1fe7b Mon Sep 17 00:00:00 2001 From: Shreya Date: Mon, 14 Jun 2021 16:26:00 +0530 Subject: [PATCH] island: Use 'x' instead of '_' when creating a secure file --- monkey/monkey_island/cc/environment/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/monkey_island/cc/environment/utils.py b/monkey/monkey_island/cc/environment/utils.py index 7c822edd1..e454843ed 100644 --- a/monkey/monkey_island/cc/environment/utils.py +++ b/monkey/monkey_island/cc/environment/utils.py @@ -61,7 +61,7 @@ def _create_secure_file_linux(path: str): flags = os.O_RDWR | os.O_CREAT # read/write, create new mode = 0o700 # read/write/execute permissions to owner - with os.open(path, flags, mode) as _: + with os.open(path, flags, mode) as x: # noqa: F841 pass except Exception as ex: @@ -90,7 +90,7 @@ def _create_secure_file_windows(path: str): CreationDisposition=file_creation, flagsAndAttributes=file_attributes, hTemplateFile=win32file.NULL, - ) as _: + ) as x: # noqa: F841 pass except Exception as ex: