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):
|
def __enter__(self):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def __exit__(self, exc_type, value, traceback):
|
def __exit__(self, _exc_type, value, traceback):
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
|
|
|
@ -31,7 +31,7 @@ class AutoNewUser(metaclass=abc.ABCMeta):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def __exit__(self, exc_type, exc_val, exc_tb):
|
def __exit__(self, _exc_type, value, traceback):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
|
|
|
@ -54,7 +54,7 @@ class AutoNewLinuxUser(AutoNewUser):
|
||||||
)
|
)
|
||||||
return subprocess.call(command_as_new_user)
|
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.
|
# delete the user.
|
||||||
commands_to_delete_user = get_linux_commands_to_delete_user(self.username)
|
commands_to_delete_user = get_linux_commands_to_delete_user(self.username)
|
||||||
logger.debug(
|
logger.debug(
|
||||||
|
|
|
@ -111,7 +111,7 @@ class AutoNewWindowsUser(AutoNewUser):
|
||||||
def get_logon_handle(self):
|
def get_logon_handle(self):
|
||||||
return self.logon_handle
|
return self.logon_handle
|
||||||
|
|
||||||
def __exit__(self, exc_type, exc_val, exc_tb):
|
def __exit__(self, _exc_type, value, traceback):
|
||||||
# Logoff
|
# Logoff
|
||||||
self.logon_handle.Close()
|
self.logon_handle.Close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue