forked from p15670423/monkey
agent: Use consistent naming for parameters to __exit__()
Using these specific names prevents Vulture from identifying these parameters as unused.
This commit is contained in:
parent
9649f90cff
commit
33e74b1f3e
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue