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:
Mike Salvatore 2021-05-03 13:49:27 -04:00 committed by Shreya
parent 9649f90cff
commit 33e74b1f3e
4 changed files with 4 additions and 4 deletions

View File

@ -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):

View File

@ -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

View File

@ -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(

View File

@ -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()