From 2d18a68787dc17a3291255c13ee84d99e377d8ac Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 21 Jun 2021 09:26:39 -0400 Subject: [PATCH] island: Fix return type hint for _get_null_value_for_win32() The _get_null_value_for_win32() function does not return None, it returns a PyHANDLE object. For the moment, I'm unable to determine the correct way to import PyHANDLE so that it can be specified in the type hint. Since type hints aren't actually enforced, it's not worth the effort to fully solve this at the present time, so the type hint has just been removed. --- monkey/monkey_island/cc/server_utils/file_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/server_utils/file_utils.py b/monkey/monkey_island/cc/server_utils/file_utils.py index ebd28595b..7c4ab59fb 100644 --- a/monkey/monkey_island/cc/server_utils/file_utils.py +++ b/monkey/monkey_island/cc/server_utils/file_utils.py @@ -112,6 +112,6 @@ def _get_file_descriptor_for_new_secure_file_windows(path: str) -> int: raise ex -def _get_null_value_for_win32() -> None: +def _get_null_value_for_win32(): # https://stackoverflow.com/questions/46800142/in-python-with-pywin32-win32job-the-createjobobject-function-how-do-i-pass-nu # noqa: E501 return win32job.CreateJobObject(None, "")