diff --git a/monkey/infection_monkey/network/firewall.py b/monkey/infection_monkey/network/firewall.py index cddba49fe..0851a575f 100644 --- a/monkey/infection_monkey/network/firewall.py +++ b/monkey/infection_monkey/network/firewall.py @@ -31,7 +31,7 @@ class FirewallApp(object): def __enter__(self): return self - def __exit__(self, exc_type, value, traceback): + def __exit__(self, _exc_type, value, traceback): self.close() def close(self): diff --git a/monkey/infection_monkey/utils/auto_new_user.py b/monkey/infection_monkey/utils/auto_new_user.py index f3ebda0af..767237d1f 100644 --- a/monkey/infection_monkey/utils/auto_new_user.py +++ b/monkey/infection_monkey/utils/auto_new_user.py @@ -31,7 +31,7 @@ class AutoNewUser(metaclass=abc.ABCMeta): raise NotImplementedError() @abc.abstractmethod - def __exit__(self, exc_type, exc_val, exc_tb): + def __exit__(self, _exc_type, value, traceback): raise NotImplementedError() @abc.abstractmethod diff --git a/monkey/infection_monkey/utils/linux/users.py b/monkey/infection_monkey/utils/linux/users.py index 9bd3c2bf8..002c63f96 100644 --- a/monkey/infection_monkey/utils/linux/users.py +++ b/monkey/infection_monkey/utils/linux/users.py @@ -54,7 +54,7 @@ class AutoNewLinuxUser(AutoNewUser): ) return subprocess.call(command_as_new_user) - def __exit__(self, exc_type, exc_val, exc_tb): + def __exit__(self, _exc_type, value, traceback): # delete the user. commands_to_delete_user = get_linux_commands_to_delete_user(self.username) logger.debug( diff --git a/monkey/infection_monkey/utils/windows/users.py b/monkey/infection_monkey/utils/windows/users.py index 06e626783..1a2bee53c 100644 --- a/monkey/infection_monkey/utils/windows/users.py +++ b/monkey/infection_monkey/utils/windows/users.py @@ -111,7 +111,7 @@ class AutoNewWindowsUser(AutoNewUser): def get_logon_handle(self): return self.logon_handle - def __exit__(self, exc_type, exc_val, exc_tb): + def __exit__(self, _exc_type, value, traceback): # Logoff self.logon_handle.Close()