From 098eea5d97a9985d7ab965d8b7ab8425781ebb5e Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Wed, 24 May 2023 15:52:33 -0400 Subject: AuthStrategy get_sources doesn't need transport arg anymore --- paramiko/auth_strategy.py | 2 +- tests/auth.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paramiko/auth_strategy.py b/paramiko/auth_strategy.py index 3da6d423..03c1d877 100644 --- a/paramiko/auth_strategy.py +++ b/paramiko/auth_strategy.py @@ -271,7 +271,7 @@ class AuthStrategy: # wants to live in fabric.OpenSSHAuthStrategy as not all target servers # will implement it! # TODO: needs better "server told us too many attempts" checking! - for source in self.get_sources(transport): + for source in self.get_sources(): self.log.debug(f"Trying {source}") try: # NOTE: this really wants to _only_ wrap the authenticate()! result = source.authenticate(transport) diff --git a/tests/auth.py b/tests/auth.py index a74c1f2c..52544e88 100644 --- a/tests/auth.py +++ b/tests/auth.py @@ -537,7 +537,7 @@ class AuthStrategy_: with raises(TypeError): self.strat.authenticate() result = self.strat.authenticate(self.transport) - self.strat.get_sources.assert_called_once_with(self.transport) + self.strat.get_sources.assert_called_once_with() self.source.authenticate.assert_called_once_with(self.transport) assert isinstance(result, AuthResult) assert result.strategy is self.strat -- cgit v1.2.3